Have an expression i am trying to get correct. The tag is a number and the first part, argument, of the expression works fine.
IF ({Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE} > 330, "330", "0")
Its when I try to subtract a value using that tag in the “If true” part that i get a "trying to coerce [string] to double error
IF ({Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE} > 330, "{Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE}-330", "0")
Can someone guide as to what i am doing incorrectly
If you are trying to return a numeric value then try (no quotes)-
IF ({Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE} > 330, {Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE}-330, 0)
If you are trying to return a string then try (convert value to string with toStr())-
IF ({Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE} > 330, toStr({Kepware/TCP505/DnI/Peerlink/UNCOILER_1__ FULL YEAR MAINTENANCE}-330), "0")