How to read tag's quality on change event?

when I add this line of code (below) the script stops working.
if currentValue.quality != 'Good':

When I check the data type I get this below?

What type is currentValue.quality?
How do you check its value via scripting?

You can always use


You are trying to compare a QualityCode to a string, and theyre not equal

1 Like

Yes that seems to work

isGood and other methods are available (in some circumstances, at least) in autocompletion in 8.1.18:

oh my! excellent thank you!

Consider offering the property instead of the method for NetBeans-compliant getters. They are slightly more efficient. (One fewer jython-java thunk in each case: One property lookup instead of method lookup followed by function operator invocation.)


Ignition 8.1.1
I’m working in a UDT tag, Value Changed event. I cannot get the intellisense code completion dropdown like the one in your pic. I’m pressing (Ctrl)(Space) but it doesn’t present the enum?

Edit: I see where you mentioned v 8.1.18. It must be specific that newer version?

8.1.18 is still currently a pre-release “nightly” build - you’re sure that’s the version you downloaded?

Yes, you must be on 8.1.18, since that’s when this improved code completion landed. Full release is scheduled for ~mid June.