# system.alarm.queryStatus filter by UUID

**URL:** <https://forum.inductiveautomation.com/t/system-alarm-querystatus-filter-by-uuid/54645>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 4, 2022, 5:03pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-filter-by-uuid/54645 "2022-01-04T17:03:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dustin.cooper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dustin.cooper/32/29963_2.png) [@dustin.cooper](https://forum.inductiveautomation.com/u/dustin.cooper)\
**Post date:** [January 4, 2022, 5:03pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-filter-by-uuid/54645/1 "2022-01-04T17:03:40Z")

</div>

Hi there,  
I’m trying to grab the extended alarm event data from a custom table component row click to drive an alarm detail popup. I have the UUID of the alarm event in the table, and have tried to grab the underlying event data with:

```auto
myUUID = '841c505f-2312-4ee0-ab9b-334fea253e85'
results = system.alarm.queryStatus(all_properties=[('UUID', '=', myUUID)])

```

but the above returns no results. I also tried converting the string representation of the alarm id to a UUID object before the query:

```auto
from java.util import UUID
myUUID = '841c505f-2312-4ee0-ab9b-334fea253e85'
myUUID = UUID.fromString(myUUID)
results = system.alarm.queryStatus(all_properties=[('UUID', '=', myUUID)])

```

I know I can do a wider query and iterate over the results to find the result that matches the clicked alarm id, but that seems really inefficient. Is there another way to do this, or get a single query result that matches a single alarm event?

---

<div class="post-metadata">

**Author:** ![dustin.cooper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dustin.cooper/32/29963_2.png) [@dustin.cooper](https://forum.inductiveautomation.com/u/dustin.cooper)\
**Post date:** [January 4, 2022, 5:40pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-filter-by-uuid/54645/2 "2022-01-04T17:40:46Z")

</div>

A more attentive reading of the manual for this function shows that the `any_properties` and `all_properties` keywords are only for associated data. (at least according to code snippet comments)

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

It appears that using the full `source` property of the alarm event like so:

```auto
mySource = 'prov:<myProvider>:/tag:<myTagPath>:/alm:<myAlarmName>'
results = system.alarm.queryStatus(source=[mySource])

```

does the trick of returning a single result matching the desired alarm event data.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [January 4, 2022, 6:44pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-filter-by-uuid/54645/3 "2022-01-04T18:44:13Z")

</div>

Glad to hear you got it working. For posterity, in your first example, you could replace “UUID” with “EventId”

```auto
myUUID = '841c505f-2312-4ee0-ab9b-334fea253e85'
results = system.alarm.queryStatus(all_properties=[('EventId', '=', myUUID)])

```

I think the problem is that the `all_properties` and `any_properties` filters were looking for specific keys that aren’t listed in the docs. I’ll figure out what those are and get them added to the documentation.

---

<div class="post-metadata">

**Author:** ![dustin.cooper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dustin.cooper/32/29963_2.png) [@dustin.cooper](https://forum.inductiveautomation.com/u/dustin.cooper)\
**Post date:** [January 4, 2022, 7:21pm UTC](https://forum.inductiveautomation.com/t/system-alarm-querystatus-filter-by-uuid/54645/4 "2022-01-04T19:21:05Z")

</div>

Thanks Paul - this is cleaner than my workaround, and having the `any/all_properties` keys documented would be nice to have.
