Enabled status of UDT tags

I have a UDT with some tags enabled and some not. I would like to make certain items visible if the tag is enabled. I’ve tried checking if the value was null with mixed results. The other alternative I could do is to create another memory tag to keep track of what should be visible/enabled or not.

I’ve searched the help for “isEnabled” and it points to MES objects. Is there something that does the same for tags?

Thanks!

You should be able to read the “Enabled” property using system.tag.read() supplying a tag path with “.Enabled” at the end of it.

Any of the tag properties can be read in this manner, and when no property is supplied then Value is assumed.

That doesn’t seem to work in my expression script:
I have a button and when i try to bind the Enabled property to this expression:
system.tag.read(“Tanks/ST100/ComponentSpecs/Butterfat”).Enabled

I get an error: Scan Error: Illegal character .> (Line 1 , Char 7)

Try system.tag.read(“Tanks/ST100/ComponentSpecs/Butterfat.Enabled”)
It should works

That didn’t work either. I think that script won’t work within the Expression Property Binding.

That syntax looks like it would only work in Event Handler scripts (python). And since I’m working with a Template, I don’t get an event for initial rendering i can’t set the visibility then. I can try to put the code into the locale event firing, but not liking that.

I’d really love to keep this in the visibility property of the item on my template and not hidden in a script. It makes for better “readability” and allows others to quickly see what I’ve done.

Expressions! Doh!

Tanks/ST100/ComponentSpecs/Butterfat.Quality != ‘Disabled’