# Create custom Alarm Event Table

**URL:** <https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261>\
**Category:** Ignition\
**Created:** [June 23, 2024, 7:02pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261 "2024-06-23T19:02:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [June 23, 2024, 7:02pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261/1 "2024-06-23T19:02:56Z")

</div>

To Ignition Alarm Expert:

When an alarm became active, acknowledged or cleared, it will create a new row on Alarm Event Table on Database.

I want to create my own table, for the alarms to be written to, similar to the above.  
How do I sense the change of State of any configured alarms. Such that when it change I will do a write query to my custom table in database.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [June 23, 2024, 7:11pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261/2 "2024-06-23T19:11:59Z")

</div>

> **[system.alarm.queryStatus | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-alarm/system-alarm-queryStatus)**
>
> Queries the current state of alarms. The result is a list of alarm events, which can be queried for individual properties.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [June 23, 2024, 7:50pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261/3 "2024-06-23T19:50:22Z")

</div>

Thank you.

Below is the result of `system.alarm.queryStatus`

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

This is not so efficient.  
I will need to poll this regularly, check EventId and State. See if it exist on my custom table. If it already exist do not write. If it doesn't exist. Do a write query.

I am looking for, to check if an alarm became active. without polling.

Like how the Journal being populated.  
One line when it became active  
One line when it was cleared  
One line when it was acknowledge.

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [June 23, 2024, 8:18pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261/4 "2024-06-23T20:18:04Z")

</div>

Oh I got it...

I got two options..  
Use Pipeline.. add my Write query on the pipeline..

2nd option. On the Tag's change script, there are an alarm events.. My bad.

Thank you.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [June 23, 2024, 8:23pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261/5 "2024-06-23T20:23:32Z")

</div>

> [@Eugene49](#):
>
> This is not so efficient.

Using tag change scripts is more efficient?

---

<div class="post-metadata">

**Author:** ![Eugene49](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@Eugene49](https://forum.inductiveautomation.com/u/Eugene49)\
**Post date:** [June 23, 2024, 8:33pm UTC](https://forum.inductiveautomation.com/t/create-custom-alarm-event-table/92261/6 "2024-06-23T20:33:36Z")

</div>

> [@jlandwerlen](#):
>
> Using tag change scripts is more efficient?

I supposed. As it only runs when an alarm occurred.
