# Alarm status Query

**URL:** <https://forum.inductiveautomation.com/t/alarm-status-query/71155>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [March 16, 2023, 12:20pm UTC](https://forum.inductiveautomation.com/t/alarm-status-query/71155 "2023-03-16T12:20:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [March 16, 2023, 12:20pm UTC](https://forum.inductiveautomation.com/t/alarm-status-query/71155/1 "2023-03-16T12:20:43Z")

</div>

Hi,

I use the system.alarm.queryStatus function. to get my active alarm and the associated data.  
When an associated data has a binding set, the name of the associated data is not returned and i get like a path to get to the binding.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/847523823508a9119c3556d771ea82a3c4297d2e.png)  
The binding is an expression to calculate an Id. This seems only to affect the associated data.  
The label is binding to a tag inside the udt and that one i get it correctly. Every associated data without binding are also returned correctly.

I'm in 8.1.25 installed on a Ubuntu server

Doesn't anyone have an idea on how to return the correct name ?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Fadil\_Shaikh](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@Fadil\_Shaikh](https://forum.inductiveautomation.com/u/Fadil_Shaikh)\
**Post date:** [March 27, 2023, 9:08pm UTC](https://forum.inductiveautomation.com/t/alarm-status-query/71155/2 "2023-03-27T21:08:32Z")

</div>

Hey,

Can you please post a screenshot of your binding? And/or an example?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [March 28, 2023, 1:38pm UTC](https://forum.inductiveautomation.com/t/alarm-status-query/71155/3 "2023-03-28T13:38:21Z")

</div>

Hi @Fadil_Shaikh

```auto
	alarms=system.alarm.queryStatus(state=["ActiveUnacked","ActiveAcked"])
	data = []
	for Alarm in alarms:
		row={}
		for Properties in Alarm.getActiveData().getProperties():
			row[Properties]=Alarm.get(Properties)
		data.append(row)
	return data

```

Here you can find the script i use to get the name and value of the associated data.

> [@How to pull Associated Alarm Data from the alarm event list generated with system.alarm.queryStatus?](https://forum.inductiveautomation.com/t/how-to-pull-associated-alarm-data-from-the-alarm-event-list-generated-with-system-alarm-querystatus/27527/9):
>
> After restarting my gateway a few times I am now getting the name of the associated alarm data as I titled it. so when I run: results = system.alarm.queryStatus(state=["ActiveUnacked"]) for Alarms in results: for Properties in Alarms.getActiveData().getProperties(): print Properties I now am getting: mode setpointA eventValue TTS name AreaDesc eventTime priority displayPath enabled Very confusing that it wasn’t returning as TTS initially, but now it does so I can grab the data I…

i found this post telling that after a restart the name come correctly. and that's the case even in 8.1.26. but is you change the binding on the associated data. then it's broke until you execute another gateway restart.

Regards

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [April 5, 2023, 4:27pm UTC](https://forum.inductiveautomation.com/t/alarm-status-query/71155/4 "2023-04-05T16:27:47Z")

</div>

hi @Fadil_Shaikh,

Do you have any update on that behavior ?

Regards

---

<div class="post-metadata">

**Author:** ![Fadil\_Shaikh](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@Fadil\_Shaikh](https://forum.inductiveautomation.com/u/Fadil_Shaikh)\
**Post date:** [April 6, 2023, 6:04pm UTC](https://forum.inductiveautomation.com/t/alarm-status-query/71155/5 "2023-04-06T18:04:45Z")

</div>

Hey @Arnaud_Declerck

Due to the complexity of the action being performed, it is hard to tell why this behavior is happening. I would suggest getting in contact with our [support department](https://support.inductiveautomation.com/hc/en-us) and creating a ticket to a further look into this.
