# eventValue

**URL:** <https://forum.inductiveautomation.com/t/eventvalue/12728>\
**Category:** Ignition\
**Created:** [February 27, 2017, 9:40pm UTC](https://forum.inductiveautomation.com/t/eventvalue/12728 "2017-02-27T21:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adolfo.rafael.martin](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@adolfo.rafael.martin](https://forum.inductiveautomation.com/u/adolfo.rafael.martin)\
**Post date:** [February 27, 2017, 9:40pm UTC](https://forum.inductiveautomation.com/t/eventvalue/12728/1 "2017-02-27T21:40:44Z")

</div>

I have code that returns the alarm status with the following:

alarmDict = system.dataset.toPyDataSet(system.alarm.queryStatus().getDataset())  
jsonString = system.util.jsonEncode(alarmDict)  
return {‘response’: jsonString, “contentType”:"/json"}

Now, I want to relate these alarm events to the alarm\_event\_data table (so I can see what the eventValue was for that event). I see a number of ways. But

what way would you recommend to do this?

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [February 27, 2017, 11:18pm UTC](https://forum.inductiveautomation.com/t/eventvalue/12728/2 "2017-02-27T23:18:54Z")

</div>

system.alarm.queryStatus returns a list of AlarmEvent objects matching the specified filter. For example, to return a list of active, unacknowledged alarms you could use:`alarms = system.alarm.queryStatus(state=['ActiveUnacked'])`You can then interrogate the AlarmEvent objects using something like`for alarm in alarms:
	print alarm.getDisplayPath()
 `
