# Disabling an alarm based on the value of another tag

**URL:** <https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503>\
**Category:** Ignition\
**Created:** [September 22, 2015, 8:35pm UTC](https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503 "2015-09-22T20:35:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pam3636](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Pam3636](https://forum.inductiveautomation.com/u/Pam3636)\
**Post date:** [September 22, 2015, 8:35pm UTC](https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503/1 "2015-09-22T20:35:02Z")

</div>

I’m not a scripter. I’m learning. So I will need a more detailed response. Sorry

I have false alarms throwing because of comms problems at the client site.

So Pump 1 will alarm when it shouldn’t

But I found that the Pump Start value is always negative during the false alarm

So I figure I need a script in the Alarm Active tag event that says “If pump start \< 0 cancel Pump alarm”

From the digging I’ve done I guessed I’ll need system.alarm.cancel. Then I have to put an alarm ID after it [fkjh3loj2hlkjfnlkj3h3lerkjj] a long string. I have no clue how to address the alarm I need to cancel, or find the alarm ID if that is the case.

Any help would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 23, 2015, 2:45pm UTC](https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503/2 "2015-09-23T14:45:14Z")

</div>

[system.alarm.queryStatus](https://docs.inductiveautomation.com/display/DOC/system.alarm.queryStatus) might be what you’re looking for. Check the example in the linked documentation for how to get AlarmEvent info from a specific source, then you’ll use getId() to get the ID

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [September 24, 2015, 4:53pm UTC](https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503/3 "2015-09-24T16:53:53Z")

</div>

Hi,

It may be more effective to try to prevent the false alarm in the first place. On the alarm definition, you can bind the “enabled” property to a condition. So, you could end up with an expression binding something like this:  
“{PumpStart}\>0”

That way, the alarm eval would only be enabled when that condition was true.

Regards,

---

<div class="post-metadata">

**Author:** ![Pam3636](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Pam3636](https://forum.inductiveautomation.com/u/Pam3636)\
**Post date:** [September 25, 2015, 7:16pm UTC](https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503/4 "2015-09-25T19:16:56Z")

</div>

That’s a much easier way to go about it. I’ll give it a try. Thanks!

---

<div class="post-metadata">

**Author:** ![Pam3636](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@Pam3636](https://forum.inductiveautomation.com/u/Pam3636)\
**Post date:** [September 28, 2015, 4:39pm UTC](https://forum.inductiveautomation.com/t/disabling-an-alarm-based-on-the-value-of-another-tag/10503/5 "2015-09-28T16:39:04Z")

</div>

This did it! Thanks again!  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/47dff62a42d5875be8ef0bc4e3da8a3907083875.JPG)
