# Data Type for Alarm Mode and AckMode for Scripting

**URL:** <https://forum.inductiveautomation.com/t/data-type-for-alarm-mode-and-ackmode-for-scripting/25197>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [May 21, 2019, 3:28pm UTC](https://forum.inductiveautomation.com/t/data-type-for-alarm-mode-and-ackmode-for-scripting/25197 "2019-05-21T15:28:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![apgilber](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@apgilber](https://forum.inductiveautomation.com/u/apgilber)\
**Post date:** [May 21, 2019, 3:28pm UTC](https://forum.inductiveautomation.com/t/data-type-for-alarm-mode-and-ackmode-for-scripting/25197/1 "2019-05-21T15:28:56Z")

</div>

I’m using a script to add an alarm to many tags. Everything is working well other than the mode and ackmode parameters. I’ve seen references in the manual to setting it as a string and other references in the forum that set it to a integer value however both are not working in my setup. I’m using Ignition 8 if that makes any difference. Below is how I’m setting up my script.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/ae186ef89cec005b935dad3134d8713c8b60cf91.png)

---

<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:** [May 21, 2019, 5:07pm UTC](https://forum.inductiveautomation.com/t/data-type-for-alarm-mode-and-ackmode-for-scripting/25197/2 "2019-05-21T17:07:17Z")

</div>

I believe this page is up to date: [https://docs.inductiveautomation.com/display/DOC80/Tag+Alarm+Properties#TagAlarmProperties-AlarmPropertyReference](https://docs.inductiveautomation.com/display/DOC80/Tag+Alarm+Properties#TagAlarmProperties-AlarmPropertyReference)  
Looks like it should be one of `"System"`, `"Manual"`, or `"Unused"`.

---

<div class="post-metadata">

**Author:** ![apgilber](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@apgilber](https://forum.inductiveautomation.com/u/apgilber)\
**Post date:** [May 22, 2019, 6:28pm UTC](https://forum.inductiveautomation.com/t/data-type-for-alarm-mode-and-ackmode-for-scripting/25197/3 "2019-05-22T18:28:18Z")

</div>

My code must have been bombing out on the mode before it got to the ackMode. For the mode we had to pull in the AlarmMode enumeration from the alarming config and then use AlarmMode.Inequality. Once that was working then the “Unused” worked.

Thanks!

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/647be1f049164e8084da119e86cc9521733d6d8c.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6c48b33de51d6a0cb1504142534131a3b0118d12.png)
