Using The On Condition Alarm Mode

I have a string point that returns various strings containing the word ‘ESD’. Is there a way to create an alarm that will fire off if any of the returned values have the word ESD in it? I’ve tried using the on condition alarm and binding the is active to the following, however, this is not working.

That’s (almost) Python syntax, which is not the same as the expression language.
Expressions (basically) don’t have statements, only functions - so if is implemented as a function:
https://docs.inductiveautomation.com/display/DOC80/if
if(condition, trueValue, falseValue)

But, actually, since you’re just trying to return a value, and expressions by definition must return a value, you don’t need an if statement at all; in your case, you can just use the like operator:
{[.]Status Message.Value} like "%ESD%"

Which will automatically return a true/false based on the like condition.

3 Likes

Ahhh!!! I get it now… that worked like a champ. Thank YOU!

1 Like