Working with alarms generated by tags within a certain folder

I have my tags organised into various folders according to plant area.

Is there any way of:
(a) counting how many alarms are e.g. active and acknowledged, relating only to tags contained in a certain folder
(b) determining what the highest priority alarm from that group of alarms is
(c) displaying an alarm table filtered to only show these alarms
What I want to ultimately do is highlight certain area overview icons based on alarms specifically related to that area.

You want system.alarm.queryStatus for this.
(a) len(system.alarm.queryStatus(source=["*:/tag:folder*"],state=['ActiveAcked']))

You can get the alarm priorities but they are going to be “Low”, “High” etc. You would need to iterate through and determine the highest, i don’t have example code for that.

The filters on the alarm status table should be able to do what you want, though you may need build your filter string dynamically with scripting.

1 Like

Excellent, I can work out the scripting for extrapolating the highest alarm priority from there. Just needed the starting point of how to get the alarm data from a specific folder. Looks like the source parameter in system.alarm.queryStatus function is just what I need. Thanks!

Another way to do it would be using the group property, but the source works just fine also.

Actually disregard, i am not sure the group is what i think it is.