Hi guys, a very simple one here… I’ve got a type Integer tag, and to write it into an if statement whenever the value is 5. But the expression in the property binding just doesnt like it.
am I writing in the wrong language?
if({Root Container.UDT_Instance::status.status} == "5"), value=true , value=false)
You are comparing to a string, because you quoted the digit. You also are using ==
, which isn’t appropriate in expressions. (Python uses that.)
Also, you can’t make assignments in an expression, so your trailing use of value
won’t do what you think. Finally, any comparison yields a boolean, so you don’t need the if()
expression function at all. Just use this:
{Root Container.UDT_Instance::status.status} = 5