# Shelve Alarms from Perspective Alarm Status Table

**URL:** <https://forum.inductiveautomation.com/t/shelve-alarms-from-perspective-alarm-status-table/75151>\
**Category:** Ignition\
**Tags:** ignition81, vision, perspective\
**Created:** [June 16, 2023, 3:39pm UTC](https://forum.inductiveautomation.com/t/shelve-alarms-from-perspective-alarm-status-table/75151 "2023-06-16T15:39:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [June 16, 2023, 3:39pm UTC](https://forum.inductiveautomation.com/t/shelve-alarms-from-perspective-alarm-status-table/75151/1 "2023-06-16T15:39:40Z")

</div>

Having a hard time adapting the example given in the manual for `system.alarm.shelve()` for use in Perspective, since it's a Vision example.

Anybody have a working script?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [June 16, 2023, 4:03pm UTC](https://forum.inductiveautomation.com/t/shelve-alarms-from-perspective-alarm-status-table/75151/2 "2023-06-16T16:03:41Z")

</div>

Any conversion would really depend on the structure of the View, as well as the structure of the `data` property of your table. Are you using a DataSet, or an array/list of objects? What does the structure of one of your rows look like?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [June 16, 2023, 4:22pm UTC](https://forum.inductiveautomation.com/t/shelve-alarms-from-perspective-alarm-status-table/75151/3 "2023-06-16T16:22:48Z")

</div>

My acknowledge button might give some insight into my setup.

```auto
def runAction(self, event):
	data = self.parent.parent.getChild("AlarmStatusTable").props.selection.active.data
	rowCount = len(data)
	
	if rowCount > 0 :
		uuids = []
		for r in range(0, rowCount):
			uuids.append(str(data[r].eventId))
		
		system.alarm.acknowledge(uuids, None, None)

```

Now that I look at this a little closer it might be easy to change this to shelve instead of acknowledge. Just need to get paths instead of eventId.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [June 16, 2023, 4:56pm UTC](https://forum.inductiveautomation.com/t/shelve-alarms-from-perspective-alarm-status-table/75151/4 "2023-06-16T16:56:01Z")

</div>

I've got it to this point, but I need to get the path to the tag for the selected alarms. I'm not seeing the path under selection/active/data/0\

However, I found that using "source" does work, even though it doesn't appear to match the typical "path" that I'm used to seeing

```auto
def runAction(self, event):
	data = self.parent.parent.getChild("AlarmStatusTable").props.selection.active.data
	rowCount = len(data)
	
	if rowCount > 0 :
		paths = []
		for r in range(0, rowCount):
			paths.append(str(data[r].source))
		

		system.alarm.shelve(paths, timeoutMinutes = 5)

```
