Gateway tag change script

So if a Gateway tag change script is watching a db tag called Data/test1

using the following sript-

if newValue.getQuality().isGood() and newValue()!="":

it won’t work if Data/test1 contains an expression. Data/test2 wil never update. Remove the expression (if test1 is just a value) and it works. Why is this?

What version of Ignition do you have? This worked just fine for me in 7.4.1:[code]value = newValue.value
quality = newValue.quality
isGood = quality.isGood()

if isGood and value != “”:
system.tag.writeToTag(“Test2”, value)[/code]Assuming both tags are strings.

We have 7.2.8

Both tags are strings and it does the same thing when using your code (won’t update).

Does it work if you remove the if statement?

Still doesn’t work with the if statement removed.

Ok, so I created a duplicate gateway tag change script and now it works. I hadn’t moved any folders or tag paths previously, and had even tried deleting the tag path from the original script and dragging it in “fresh”.

So, your previous code does work right. It was just a matter of the script not firing? Is it all OK now?