# system.alarm.queryStatus not working with more than 1 properties item

**URL:** <https://forum.inductiveautomation.com/t/system-alarm-querystatus-not-working-with-more-than-1-properties-item/30003>\
**Category:** General Discussion\
**Created:** [November 15, 2019, 4:22pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-not-working-with-more-than-1-properties-item/30003 "2019-11-15T16:22:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngchonghan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ngchonghan/32/13420_2.png) [@ngchonghan](https://forum.inductiveautomation.com/u/ngchonghan)\
**Post date:** [November 15, 2019, 4:22pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-not-working-with-more-than-1-properties-item/30003/1 "2019-11-15T16:22:09Z")

</div>

I am trying to filter out the alarms (which there are 4 in totals) using associated data as shown in the below script:

**props = [(“AlarmGroup”,"=",1),(“AlarmGroup”,"=",2)]**  
**path = [`'*`Anyhow`*'`]**  
**state = [‘ActiveUnacked’]**

**print len(system.alarm.queryStatus(source = path,all\_properties = [(“AlarmGroup”,"=",1)],state = state))**  
**print len (system.alarm.queryStatus(source = path,all\_properties = props,state = state))**

If the **all\_properties = [(“AlarmGroup”,"=",1)** is set, I am able to get 2 of the alarms. However, I would get 0 alarms if **all\_properties = props** is used instead.

Any idea why is it so ?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 15, 2019, 4:54pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-not-working-with-more-than-1-properties-item/30003/2 "2019-11-15T16:54:04Z")

</div>

You need to use `any_properties`, not `all_properties` - you’re asking for alarms that have an `AlarmGroup` of both 1 **and** 2, simultaneously.  
[https://docs.inductiveautomation.com/display/DOC80/system.alarm.queryStatus](https://docs.inductiveautomation.com/display/DOC80/system.alarm.queryStatus)

---

<div class="post-metadata">

**Author:** ![ngchonghan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ngchonghan/32/13420_2.png) [@ngchonghan](https://forum.inductiveautomation.com/u/ngchonghan)\
**Post date:** [November 16, 2019, 1:15am UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-not-working-with-more-than-1-properties-item/30003/3 "2019-11-16T01:15:47Z")

</div>

Thanks Paul. It is working now!

Btw, I think the below misleading caused my wrong usage (see the all\_properties argument in the function):

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/25ab1684c7dc3bf2ef3ab81245b36ce27e39af3a.png)

Cheers!
