# ValueChange script run multiple time

**URL:** <https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217>\
**Category:** Ignition\
**Created:** [May 30, 2018, 11:22am UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217 "2018-05-30T11:22:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@Vince](https://forum.inductiveautomation.com/u/Vince)\
**Post date:** [May 30, 2018, 11:22am UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217/1 "2018-05-30T11:22:21Z")

</div>

Hi everyone,

I have a UDT containing multiple tags. Some tag are OPC tag, other are expression tag. Some tag contains ChangeValue script. It was working fine since a few month.

We got a problem since about 2 weeks. Sometimes, a ChangeValue script execute 2 or 3 times when the value of the tag change only one time.

Any idea?

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [May 30, 2018, 2:53pm UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217/2 "2018-05-30T14:53:54Z")

</div>

You could check that newValue is different from oldValue before executing.

---

<div class="post-metadata">

**Author:** ![Vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@Vince](https://forum.inductiveautomation.com/u/Vince)\
**Post date:** [June 7, 2018, 3:29pm UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217/3 "2018-06-07T15:29:26Z")

</div>

Problem found… Too stupid to be published here …

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [June 7, 2018, 3:31pm UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217/4 "2018-06-07T15:31:32Z")

</div>

We don’t judge 😁

Seriously though, posting your solution could help those who stumble across this thread in the future.

---

<div class="post-metadata">

**Author:** ![Vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@Vince](https://forum.inductiveautomation.com/u/Vince)\
**Post date:** [June 7, 2018, 3:55pm UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217/5 "2018-06-07T15:55:21Z")

</div>

The tag exist in double…

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [June 7, 2018, 5:17pm UTC](https://forum.inductiveautomation.com/t/valuechange-script-run-multiple-time/18217/6 "2018-06-07T17:17:43Z")

</div>

Good find! That will certainly cause the issue.
