Expression Tag Broken After 8.1 Upgrade

We have an expression tag that counts up from 0 every second until it reaches 600 seconds. It worked fine until we upgraded from 7.9 to 8.1. This is the function: IF({[.]Counter}<600,{[.]Counter}+1,0). It now returns an error: [null, Error_ExpressionEval("If function got a null first argument"). Did something change to break this expression? Thank you.

Tip: use the </> code formatting button to preserve code indentation and apply syntax highlighting.

if({[.]Counter} < 600, {[.]Counter} + 1, 0)

Can you show the tag setup? Is Counter a self reference or a reference to something else?

1 Like

Thanks for the response. It's a self reference.

It's probably been converted to use the event driven execution mode instead of tag group to update the tag. 99% of expression tags should use this, butIn this case, using a curricular reference would yield terrible results. Try changing it back to a tag group

1 Like

It'll never start up with v8.1. It's null to begin with, so the comparison will always choke. Wrap the entire expression in a try() function, to get you a zero to start.


Worked like a charm. Thank you very much.