# How to run a script continuously to update tags

**URL:** <https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 18, 2024, 1:57pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018 "2024-06-18T13:57:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitchell\_Gerber](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mitchell\_Gerber](https://forum.inductiveautomation.com/u/Mitchell_Gerber)\
**Post date:** [June 18, 2024, 1:57pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/1 "2024-06-18T13:57:55Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 18, 2024, 1:58pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/2 "2024-06-18T13:58:37Z")

</div>

I would bind the visibility property of the component to the tag. No scripting needed.

---

<div class="post-metadata">

**Author:** ![Mitchell\_Gerber](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mitchell\_Gerber](https://forum.inductiveautomation.com/u/Mitchell_Gerber)\
**Post date:** [June 18, 2024, 2:17pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/3 "2024-06-18T14:17:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 18, 2024, 2:35pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/4 "2024-06-18T14:35:02Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Mitchell\_Gerber](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mitchell\_Gerber](https://forum.inductiveautomation.com/u/Mitchell_Gerber)\
**Post date:** [June 18, 2024, 2:41pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/5 "2024-06-18T14:41:49Z")

</div>

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.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/0/102cc7044ddd102bd735586f63acd03129f13634.png)

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [June 18, 2024, 5:48pm UTC](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/6 "2024-06-18T17:48:12Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/2/e24824c8cf8a5d0b64d815a3626da7038b094a82.png)

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.

> **[Map Transform Video at Inductive University](https://www.inductiveuniversity.com/videos/map-transform/8.1)**
>
> This lesson introduces the Map Transform. This simple transform takes the results of a component binding, and returns a different value, based on what the binding returned. Useful when mixing data types, such as retrieving a numerical value from a...
