[FEATURE] Perspective - Alarm Grouping Binding for other components

It would be very useful to be able to bind something like a label component to use a “filterAlarm” extension function. The idea is to be able to do things like the “Alarm Journal” component when using the “filterAlarm” extension function. But in this case to “filterAlarm” down to a single value (e.g. to get alarm counts, or to get the priority of the highest priority alarm) and display that in a label.

For example:

  • Have a number of tags be assigned “Group A” to their associated data “Group”.
  • Then bind a component (e.g. a label component) to get the alarm count on the associated data “Group” for “Group A”.

Something like this will particularly benefit Perspective as it is well built for summarizing data.

Posted this under the “Ignition Features and Ideas” page:

https://inductiveautomation.canny.io/ignition-features-and-ideas/p/perspective-alarm-grouping-binding-for-other-components

You can get the alarm count for an alarm group by doing a script transform on a binding. For example, if you want to update your alarm count every 2 seconds, bind to “now(2000)”. Then put a script transform on it that looks like this:

	props = [("AlarmGroup", "=", self.params.AlarmGroup)]
	state = ["ActiveUnacked", "ActiveAcked"]
	alarms = system.alarm.queryStatus(all_properties = props, state = state)
	
	return len(alarms)

In this example I have a parameter on my view called “AlarmGroup” which contains the Alarm Group.