# Perspective Alarm Status Table Filter by Associated Alarm Data

**URL:** <https://forum.inductiveautomation.com/t/perspective-alarm-status-table-filter-by-associated-alarm-data/30917>\
**Category:** Ignition\
**Created:** [December 24, 2019, 3:01pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-table-filter-by-associated-alarm-data/30917 "2019-12-24T15:01:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [December 24, 2019, 3:01pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-table-filter-by-associated-alarm-data/30917/1 "2019-12-24T15:01:20Z")

</div>

I have a perspective project where the customer wants to toggle which alarms show on an alarm status table based on the state of a series of toggle switches. Ideally, I would like to update the table filter using a binding or a binding + transform or maybe a message handler.

I have alarm groups configured using custom Associated Alarm Data.

I’m trying to figure out how to filter the results of a Perspective Alarm Status Table using Associated Alarm Data. I’m familiar with filtering alarms by group using system.alarm.queryStatus but I don’t think there’s a way to bind the results of that method to the Alarm Status Table.

I was thinking maybe I need to use a Message handler or binding but I don’t know how to reference the Associated data on an alarm from the Alarm Status Table.

I’m pretty sure there’s a way to do this but I haven’t found it yet.

Can someone help me with this?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [December 24, 2019, 3:32pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-table-filter-by-associated-alarm-data/30917/2 "2019-12-24T15:32:52Z")

</div>

In the extension function of the alarm status table you can filter on associated data.

```auto
	try:
		group = alarmEvent.get("AlarmGroup")
	except:
		group = ''
	groupName = self.parent.getComponent('ddFilter').selectedLabel #Grab the groupname from the drowpdown list
	table = self.getComponent(0).getComponent(0).getComponent(1).getComponent(0).getComponent(0).getComponent(0)
	if groupName[3:]!='_Alarms':
		if groupName!='' and groupName != None:
			if group == groupName:
				table.sortColumn(6,True,False)
				return True
			else:
				table.sortColumn(6,True,False)
				return False
	else:
		return True

```

We do some additional things like sort the table and check for other properties but the above code should get you going in the right direction. Our Associated Data is named AlarmGroup

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [December 24, 2019, 3:36pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-table-filter-by-associated-alarm-data/30917/3 "2019-12-24T15:36:01Z")

</div>

I think you’re looking at the Vision module Alarm Status Table. I might be missing something but I have not been able to locate any extension functions on the Perspective Alarm Status Table.

I feel like there should be a way to do this with a Message Handler or a Binding Transform but I haven’t found an example.

---

<div class="post-metadata">

**Author:** ![Tim.Johnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim.johnson/32/10597_2.png) [@Tim.Johnson](https://forum.inductiveautomation.com/u/Tim.Johnson)\
**Post date:** [February 15, 2024, 4:34pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-table-filter-by-associated-alarm-data/30917/4 "2024-02-15T16:34:52Z")

</div>

I know this is old, but I'm just commenting here in case anyone else is searching...

The Extension Functions are in the _Configure Scripts..._ link in the context menu of the **Alarm Status Table** component.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6c78c71a320dd6d3abd65e2d8841caa1fec69aef.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/a/9a6f24a7fec777984aeaf1867b6264e3cd2347a7.png)

For example, if you were to add a view parameter named "alarmGroup", and then use the following script, you should get what you need.

```auto
def filterAlarm(self, alarmEvent):
	group = alarmEvent.get("Group")
	if group == self.view.params.alarmGroup:
		return True
	return True

```

There's an entry regarding [Alarm Grouping](https://www.docs.inductiveautomation.com/docs/8.1/platform/alarming/configuring-alarms/alarm-associated-data#creating-an-alarm-grouping) in the docs that outlines it.
