# Custom message configuration for Alarms

**URL:** <https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438>\
**Category:** General Discussion\
**Created:** [July 17, 2023, 1:03am UTC](https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438 "2023-07-17T01:03:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bharat\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bharat\_Krishnan](https://forum.inductiveautomation.com/u/Bharat_Krishnan)\
**Post date:** [July 17, 2023, 1:03am UTC](https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438/1 "2023-07-17T01:03:56Z")

</div>

I have an expression bound to an alarm's custom message which is as follows :

```auto
if({State} = "Active",{activemessage},if({State} = "Clear",{clearmessage},if({State} = "Ack",{acknowledgemessage},"ERROR")))

```

where activemessage, clearmessage and acknowledgemessage are associated datas which contains the string to be displayed and `{State}` is the event state of the alarm.  
When the alarm is active it displays the active message , when it is acknowledged it sends out an acknowledge message but when the alarm is cleared, it sends out the acknowledge message instead of the clear message.  
is there a property other than `State/ IsClear` that can be used in the expression to check whether the alarm has been cleared. If you require any more information just comment on it. Thank You.

---

<div class="post-metadata">

**Author:** ![humphrey.daniel](https://avatars.discourse-cdn.com/v4/letter/h/8e8cbc/32.png) [@humphrey.daniel](https://forum.inductiveautomation.com/u/humphrey.daniel)\
**Post date:** [July 17, 2023, 4:07am UTC](https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438/2 "2023-07-17T04:07:24Z")

</div>

I'm just guessing here, but maybe when an alarm is cleared, it is also acknowledged. If that's the case, you may need to change the order of your checks. Cleared then acknowledged, then active. I imagine the if chain stops at the first true expression.

---

<div class="post-metadata">

**Author:** ![Bharat\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@Bharat\_Krishnan](https://forum.inductiveautomation.com/u/Bharat_Krishnan)\
**Post date:** [July 17, 2023, 4:19am UTC](https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438/3 "2023-07-17T04:19:10Z")

</div>

I tried a similar expression checking if it is cleared first then acknowledged as you mentioned. The state property never changes to `Clear`, when the alarm is cleared but stays in the` Ack` state and when the alarm is active again it returns cleared,i,e.it is basically returning the previous state instead of current state of the alarm. Any suggestions regarding that?

---

<div class="post-metadata">

**Author:** ![humphrey.daniel](https://avatars.discourse-cdn.com/v4/letter/h/8e8cbc/32.png) [@humphrey.daniel](https://forum.inductiveautomation.com/u/humphrey.daniel)\
**Post date:** [July 17, 2023, 4:55am UTC](https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438/4 "2023-07-17T04:55:00Z")

</div>

You might want to double check the documentation.  
[https://docs.inductiveautomation.com/display/DOC81/Alarming](https://docs.inductiveautomation.com/display/DOC81/Alarming)

Disclaimer: I don't have experience in Ignition, but I still like to chime in if I think might be able to help.

When I create a solution looks like it should work but doesn't, it helps to break it apart and test each element/statement separately. For your situation, I'd make alarms for each of condition and log out values at every opportunity. Maybe make a test screen with fields for all the values you're working with.

That's just generic troubleshooting advice, hope you find the answer to your problem!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 17, 2023, 12:23pm UTC](https://forum.inductiveautomation.com/t/custom-message-configuration-for-alarms/76438/5 "2023-07-17T12:23:42Z")

</div>

Should it be clear or cleared? I have a feeling it's cleared
