# Getting the Initial Value that Triggered an Alarm

**URL:** <https://forum.inductiveautomation.com/t/getting-the-initial-value-that-triggered-an-alarm/53820>\
**Category:** Ignition\
**Created:** [December 6, 2021, 10:43pm UTC](https://forum.inductiveautomation.com/t/getting-the-initial-value-that-triggered-an-alarm/53820 "2021-12-06T22:43:21Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [December 7, 2021, 9:19pm UTC](https://forum.inductiveautomation.com/t/getting-the-initial-value-that-triggered-an-alarm/53820/8 "2021-12-07T21:19:37Z")

</div>

I was on my lunch break and about to type out pretty much exactly what you have there, so good stuff. For posterity, I’ll post it anyways:

* * *

Basically, yes.

The `PyAlarmEvent` wrapper has some helper methods to allow you to retrieve properties by name alone. By going to the ‘sourceEvent’ object, you’re no longer able to use those helper methods.

There are a few options:

1. Go through the `properties` list and find the one with the name you’re after:

```python
def findProperty(propertyset, propertyname):
	for prop in propertyset.properties:
		if prop.name == propertyname:
			return prop

activeData = event.sourceEvent.getActiveData()

prop = findProperty(activeData, "PropertyName")
if prop != None:
	value = activeData.getOrDefault(prop)

```

1. Find a reference to the property you’re looking for in the SDK. Depending on your version of Ignition, this might be easier or harder, but you could start with, e.g.  
[`CommonAlarmProperties`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.12/com/inductiveautomation/ignition/common/alarming/config/CommonAlarmProperties.html)

---

_[View the full topic](https://forum.inductiveautomation.com/t/getting-the-initial-value-that-triggered-an-alarm/53820)._
