Conditional Alarm Notification

I have a system where the customer wants to be able to turn off alarm notifications temporarily for two specific alarms. There are door switches on some remote pump stations that they check daily, and they don’t want notifications from them when they make their daily rounds. We still want the alarms to be logged to be able to verify that the daily checks have been performed, just no emails and phone calls.

I have bound the field for the alarm Notification Active Pipeline to an expression as follows:

if(tag("Door Switch Notify").value==1,"Voice","<none>")

“Voice” is the configured pipeline we are using. “Door Switch Notify” is the boolean tag we are using to enable notification. The tag is linked to PLC code which will automatically set the bit after it is off for 4 hours thereby ensuring they don’t forget to turn the alarms back on.

I think this is going to work, but wanted a sanity check.

First, am I right in using double equal signs to designate an equality test in my If() function?
And secondly, are those return values as strings appropriate for this field?

Thanks

I see two issues. If your linking directly to a tag, there is no reason to use tag().value. And your equality test is written like python, in an expression it would just be a single =. I’m also not sure if the <none> is right or if it should just be None without quotes to represent a null value.

if({[~]Door Switch Notify}=1,"Voice","<none>")

Thanks for the feedback. I made the changes you recommend and got no errors, so we’ll have them test it to make sure it all works as expected.