# Change script execute only on committed change?

**URL:** <https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634>\
**Category:** Ignition Early Access\
**Created:** [February 17, 2019, 10:43pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634 "2019-02-17T22:43:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [February 17, 2019, 10:43pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/1 "2019-02-17T22:43:54Z")

</div>

I notice that change scripts- for example on text inputs- are fired for every change, even during editing. So if this text needs to go into a DB, there is going to be an update SQL transaction for every letter typed. Is there any way to prevent this, such as script run on “committed value” only, or similar?

---

<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 17, 2019, 10:46pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/2 "2019-02-17T22:46:00Z")

</div>

Look at the “Defer updates” property of the text input.

---

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [February 18, 2019, 7:40pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/3 "2019-02-18T19:40:20Z")

</div>

Where do I find that? It does not appear in the properties list in my Designer…?

---

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [February 18, 2019, 9:51pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/4 "2019-02-18T21:51:07Z")

</div>

I should have been more specific: in Perspective. And it looks like there is a topic already:

> [@\[Feature-11740\] Perspective Text Field Defer Updates](http://forum.inductiveautomation.com/t/feature-11740-perspective-text-field-defer-updates/20724):
>
> Vision Text Fields can defer updating until after the enter key (or some other form of commit) occurs. Will there be a similar option for Perspecive?

Sorry I didn't see this before submitting.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 19, 2019, 3:34pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/5 "2019-02-19T15:34:33Z")

</div>

You can do this currently in a roundabout sort of way - although it might not be entirely safe depending on your use-case:

Instead of a change script, require a key-press Event (like Enter). Then use a script Action as part of the key-press Event to perform what needs to be done, including the `self.props.text` property access.

---

<div class="post-metadata">

**Author:** ![NorthPoint](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@NorthPoint](https://forum.inductiveautomation.com/u/NorthPoint)\
**Post date:** [February 19, 2019, 8:12pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/6 "2019-02-19T20:12:29Z")

</div>

Yes, I thought of that too, as well as similar “end” events like focus lost, but at least in Vision these did not work as well as the deferred updates. Will this be implemented in Perspective?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 19, 2019, 8:42pm UTC](https://forum.inductiveautomation.com/t/change-script-execute-only-on-committed-change/22634/7 "2019-02-19T20:42:13Z")

</div>

Deferred updates will definitely be in Perspective, but probably not for the 8.0 release.

8.1 is a likely candidate.
