# Alarm filter with associated data

**URL:** <https://forum.inductiveautomation.com/t/alarm-filter-with-associated-data/14528>\
**Category:** Ignition\
**Created:** [June 15, 2017, 2:48pm UTC](https://forum.inductiveautomation.com/t/alarm-filter-with-associated-data/14528 "2017-06-15T14:48:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad.sampson](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@brad.sampson](https://forum.inductiveautomation.com/u/brad.sampson)\
**Post date:** [June 15, 2017, 2:48pm UTC](https://forum.inductiveautomation.com/t/alarm-filter-with-associated-data/14528/1 "2017-06-15T14:48:13Z")

</div>

I am filtering my alarms with associated data and it works very well for the alarm client. My problem is that I created a SA alarm severity indicator and used the following script to find the number of active alarms:

runScript(“len(system.alarm.queryStatus(priority = [‘High’],state = [‘ActiveUnacked’,‘ActiveAcked’]))”, {Alarm Severity Ind.UpdateRate})

I need to be able to filter this data with my associated data, but there doesn’t seem to be a parameter for this in the script. I thought about querying the alarm database directly, but I am not certain exactly how to do that either. Any help would be much appreciated!

---

<div class="post-metadata">

**Author:** ![ikenna.nwaogu](https://avatars.discourse-cdn.com/v4/letter/i/e274bd/32.png) [@ikenna.nwaogu](https://forum.inductiveautomation.com/u/ikenna.nwaogu)\
**Post date:** [June 18, 2018, 8:35pm UTC](https://forum.inductiveautomation.com/t/alarm-filter-with-associated-data/14528/2 "2018-06-18T20:35:43Z")

</div>

I hope this helps

> [@system.alarm.queryStatus with expression](http://forum.inductiveautomation.com/t/system-alarm-querystatus-with-expression/18514/3):
>
> Thanks a lot. I actually figured the syntax error. it also seem like you have to have at least 2 parameters for it the query to run. I will definitely keep the script in mind for future alarming needs. I know I have a bunch to come so I'll simplify it through this. Thanks again.
