# Project Save effects on tag change events and project library function execution

**URL:** <https://forum.inductiveautomation.com/t/project-save-effects-on-tag-change-events-and-project-library-function-execution/36213>\
**Category:** Ignition\
**Created:** [June 30, 2020, 8:39pm UTC](https://forum.inductiveautomation.com/t/project-save-effects-on-tag-change-events-and-project-library-function-execution/36213 "2020-06-30T20:39:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [June 30, 2020, 8:39pm UTC](https://forum.inductiveautomation.com/t/project-save-effects-on-tag-change-events-and-project-library-function-execution/36213/1 "2020-06-30T20:39:10Z")

</div>

Hi All,

Running an 8.0.13 gateway with a project with a fair number of script functions defined under a project library. These scripts are being called from gateway tag change events. What we perceive to be happening is that when one of the scripts under that library is edited and we do a save in designer it is causing glitches in other scripts and causing ignition to miss tag change events or fail out of a currently running script. Is this plausible? Would it be worth it to give a call and open a ticket for assistance?

Thanks,

Frank

---

<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:** [July 1, 2020, 12:24am UTC](https://forum.inductiveautomation.com/t/project-save-effects-on-tag-change-events-and-project-library-function-execution/36213/2 "2020-07-01T00:24:59Z")

</div>

Perfectly plausible and effectively unavoidable for tag events. A robust solution uses the ‘initialChange’ flag to examine the current state vs what’s been recorded by past calls to determine if something needs to be recorded late.

To be most robust, use top-level objects in your script module(s) to carry critical state, initializing those during initial import. That leverages jython’s import lock to ensure no race conditions.

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [May 4, 2022, 7:57pm UTC](https://forum.inductiveautomation.com/t/project-save-effects-on-tag-change-events-and-project-library-function-execution/36213/3 "2022-05-04T19:57:17Z")

</div>

This shouldn’t affect tag event scripts on tags themselves though, right? Since these are not in the project being saved.

---

<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:** [May 5, 2022, 10:27am UTC](https://forum.inductiveautomation.com/t/project-save-effects-on-tag-change-events-and-project-library-function-execution/36213/4 "2022-05-05T10:27:02Z")

</div>

Tag events use the global scripting project, so they would be affected by saving that or any of its parent projects (if any).
