I currently have a script written for on start up to update an items visibility based on a tag value. I want this to continuously update as the tag value changes. How should I go about this?
Thanks!
I currently have a script written for on start up to update an items visibility based on a tag value. I want this to continuously update as the tag value changes. How should I go about this?
Thanks!
I would bind the visibility property of the component to the tag. No scripting needed.
I have tried that with several tags. However, the tags that I am monitoring need to be turned on and off based on values and so far, I have found that a script is required. Also I am using a script to flash certain visibilities.
I don't think you need a script for any of this.
Flashing things can be done with css/styles, and bindings should be enough for all this.
Can you describe your requirements and current setup in more details ?
For example:
I need the icon to be on continuously but flash when either alarm silencing is turned on. The alarms get turned on by a tag when the tag is 0 not 1, due to this binding the tag value to visibility does not work correctly.
You'll just have to add a little map transformation that acts like a NOT gate. This can still be done without scripting. For the flashing, you can make an animated style like in the below example. Simply enable this style when either of those alarms are active.
It really, really sounds like you can get rid of any startup scripts that drive this behavior and replace them with a tag binding combined with a transformation.