# Vision Client Tag Change Script Executing when switching users

**URL:** <https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789>\
**Category:** Ignition\
**Tags:** vision, ignition80\
**Created:** [February 24, 2021, 3:49pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789 "2021-02-24T15:49:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis.Dreier](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@Travis.Dreier](https://forum.inductiveautomation.com/u/Travis.Dreier)\
**Post date:** [February 24, 2021, 3:49pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789/1 "2021-02-24T15:49:29Z")

</div>

I have a vision client tag change event setup. This is set to trigger on value change of a few tags in the gateway tag group.

I noticed that this event runs on occasion when switching users on the client when the tag values do not change. Is this a bug or just something I need to implement / setup in a different way.

Travis

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 24, 2021, 4:43pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789/2 "2021-02-24T16:43:12Z")

</div>

Are you checking the “initialChange” flag? Changing users is similar to restarting the client.

---

<div class="post-metadata">

**Author:** ![Travis.Dreier](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@Travis.Dreier](https://forum.inductiveautomation.com/u/Travis.Dreier)\
**Post date:** [February 24, 2021, 6:05pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789/3 "2021-02-24T18:05:35Z")

</div>

This is not a script on a tag it is a “Client Event Script” monitoring multiple tags.

I tried adding a tag change script on the gateway tag but I need my script to modify client tags so I think it must run as a Client event.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c44cc26f88810d9cd120abe2da25fa24217711f7.png)

---

<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:** [February 24, 2021, 6:09pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789/4 "2021-02-24T18:09:44Z")

</div>

You can always make a gateway tag change to catch changes, and from there do sendMessage to the clients.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [February 24, 2021, 6:25pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789/5 "2021-02-24T18:25:25Z")

</div>

> [@Travis.Dreier](#):
>
> This is not a script on a tag it is a “Client Event Script” monitoring multiple tags

There is still an initialChange flag.

---

<div class="post-metadata">

**Author:** ![Travis.Dreier](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@Travis.Dreier](https://forum.inductiveautomation.com/u/Travis.Dreier)\
**Post date:** [February 24, 2021, 10:29pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-change-script-executing-when-switching-users/43789/6 "2021-02-24T22:29:20Z")

</div>

Not seeing how this would be done. I did try adding “if not initialChange:” to the the value change script but this not work.

I also tried adding a client tag that is referencing the gateway tag through an expression then doing a Value Changed script on the client tag. The intialChange argument still does not seem to be able to stop my script from running when switching users.
