Tag change event not working

I am having trouble with tag change events. It doesn’t seem like the code is incorrect, but when the tag value changes, the script is not executing.
Every time the value of DAY SHIFT CURRENT PARTS changes, the value of StatusTag should change to either 1 or 2, but it doesn’t.
Any suggestions?

If you look at your Gateway logs, I’m betting you’ll find that the script is failing to run because you are performing mathematical operations on Strings.

If you want tag values, you need to use system.tag.read(tag_path).value or readAsync(tag_path).value

0.8 * "Some String" 

will fail every time.

1 Like

Thanks for your help! I tried using readAsync and system.tag.read, as well as tried without the multiplication, but it still doesnt seem to be running.

1 Like

Oh! Thank you very much!!!