Ignition 8.1 Perspective Expressions (or script) Syntax

Hello Everyone,
I was searching for the correct systax in the help files and could not locate any "IF, Then, Else " syntax. I would appreciate any tips to point me in the right direction…
My desired Script or Expression Task: Bind a single boolean check box object to 4 separate boolean tags so the operator checks one box and toggles enabled or disabled on four related alarm enables. Thank you in advance…

You’re better served with a Change Script:

if currentValue is not None:
    # modify these tag paths to target the enabled status of your alarms
    tagPaths = ["tagPathOne", "tagPathTwo", "tagPathThree", "tagPathFour"]
    values = [currentValue.value for tag in tagPaths]
    system.tag.writeBlocking(tagPaths, values)
1 Like

An alternative without scripting:

  • Create a new memory tag, boolean, “Alarm Enable” (for example).
  • Bind your checkbox to that tag and make it bidirectional.
  • On each of the alarms
    • Hit the configure pencil icon
    • On the Enabled option hit the link icon and select *Tag | Alarm Enable".

That should be it. No need for ifs or buts.
It might be worth noting that if there are multiple users using clients simultaneously then one will affect all the others since the tag is on the gateway.

Try this to set all tags in one go: Ctrl-click select each of the tags to be edited. Right-click and select Edit tag(s).

The expression language if syntax is very like Excel’s IF function.
if(condition, "what to return if true", "what to return if false)
but you don’t need it in this case.


I agree with @Transistor. An on change script will work, but it will be more cumbersome to implement and will be de-centralised. Using a memory tag and binding it to the 4 alarms’ alarm enabled property will ensure the enableds reflect the state of the memory tag. The memory tag can then be used in multiple places if required

Thank you