--- title: "Alarm Associated Data" --- # Alarm Associated Data > Associated data lets you attach additional context values to an alarm event. Every alarm in Ignition already carries built-in properties as it moves through Ignition, such as active time, clear time, who acknowledged it, acknowledgement time, priority, and display path. Associated data (also called custom properties) extends this list with values of your own. Associated data values can be static or dynamic: * **Static** values are fixed and work well for filtering alarms. * **Dynamic** values are bound to a tag or expression and update accordingly. Either way, the value is attached to the alarm event as it moves through Ignition and is available from [Perspective Alarm Status](appendix\components\perspective-components\perspective-display-palette\perspective-alarm-status-table\perspective-alarm-status-table.md), [Vision Alarm Status](appendix\components\vision-components\alarming\alarm-status-table\alarm-status-table.md), the [Alarm Journal](platform\alarming\alarm-journal\alarm-journal.md), and [Alarm Notification](ignition-modules\alarm-notification\alarm-notification.md). ## Creating Associated Data You can add associated data to any existing alarm, or [create a new alarm](platform\alarming\configuring-alarms\configuring-alarms.md) first. The steps below add one static property and one dynamic property to an alarm. This example uses the `WriteableInteger1` OPC tag from the Sample_Tags provider and its built-in `Lo` alarm, but any alarm-capable tag will work. Ignition records associated data with each alarm event as it occurs, so add your properties before the events you want them to appear on; existing history is not updated retroactively. 1. Right-click your tag and select **Edit Tag**. 1. In the **Tag Editor**, scroll to **Alarms** and click the **Edit** ![](edit.png) icon. 1. Select your alarm to open the alarm editor. ![](img1.png) 1. Click the **Add** ![](add.png) icon above the alarm properties. A new property named `New Data` is added at the bottom of the list. 1. Double-click the property name and rename it to `StaticData`. 1. Set its value to `Folsom Plant` and press **Enter**. ![](img2.png) 1. Click the **Add** ![](add.png) icon again to add a second property. 1. Rename the new `New Data` property to `DynamicData`. 1. Click the **Binding** ![](binding.png) icon and bind the property to a tag. This example binds to the `Ramp0` OPC tag. 1. Click **Commit** to confirm the binding, then click **OK** to save the tag. ![](img3.png) When the alarm goes active, Ignition stores the associated data values with the alarm event. To view them in the [Alarm Status Table](appendix\components\perspective-components\perspective-display-palette\perspective-alarm-status-table\perspective-alarm-status-table.md), select the alarm and click the gray arrow at the end of its row to open **Alarm Details**. The associated data appears under the **On Active** and **On Clear** sections, alongside the event properties. ![](img4.png) ## Retrieving Associated Data in Scripts Associated data values are always stored as strings. When you retrieve a value for use in an expression or a script, typecast it to the data type you need: * In expression bindings, use the [type casting functions](appendix\expression-functions\type-casting\index.mdx). * In Python scripting, use the [type casting functions](platform\scripting\python-scripting\built-in-functions.md#type-casting-functions). To read an associated data value from an alarm event in a script, call `alarmEvent.get("PropertyName")`, then cast the returned string to the type you need. ## Alarm Grouping Grouping alarms is an important design concept. Instead of viewing every alarm in a single list, you often want to see alarms for a specific plant area or set of equipment. There are several ways to group alarms: organizing tags into a folder hierarchy, using the **Display Path** field in the alarm configuration, or using associated data. Associated data is the most flexible and recommended approach, and it is common practice to base alarm groupings on it. ### Creating an Alarm Grouping This example reuses the `WriteableInteger1` tag from the previous example and adds a `Group` property that can be used for filtering and notification. 1. Right-click your tag and select **Edit Tag**. 1. In the **Tag Editor**, scroll to **Alarms**, click the **Edit** ![](edit.png) icon, and select your alarm. 1. Click the **Add** ![](add.png) icon above the alarm properties. 1. Rename the new `New Data` property to `Group` and set a value that represents the group, such as `Production`. ![](img5.png) 1. Click **Commit** to save your alarm edits, then click **OK**. The alarm now always carries the `Group` designation, which you can use for filtering or in alarm pipeline notifications. To filter the Alarm Journal on this new property, enable and edit the `filterAlarm` extension function: 1. Right-click the **Alarm Journal** component and select **Configure Scripts...**. 1. Under **Extension Functions**, click **filterAlarm** and select the **Enabled** checkbox. 1. Edit the script to check your associated data property and value. For example: ```python title="filterAlarm scripting function" group = alarmEvent.get("Group") if group == "Production": return True return False ``` ![](img6.png) 1. Open the [Alarm Journal Table](appendix\components\perspective-components\perspective-display-palette\perspective-alarm-journal-table\perspective-alarm-journal-table.md) component and filter on your associated data. The table now displays only the alarms associated with the `Production` group. ![](img7.png)