# Commiting Table Edits Without Pressing Enter

**URL:** <https://forum.inductiveautomation.com/t/commiting-table-edits-without-pressing-enter/21210>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [December 4, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/commiting-table-edits-without-pressing-enter/21210 "2018-12-04T15:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander41](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@Alexander41](https://forum.inductiveautomation.com/u/Alexander41)\
**Post date:** [December 4, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/commiting-table-edits-without-pressing-enter/21210/1 "2018-12-04T15:22:04Z")

</div>

I’ve created a window to allow the client to edit data from my database. It queries the database for a selected row and puts the data for that row into a 1 line table. My idea is to have the table be editable and to have a button with a script that commits the edits back to the database. However, the script only recognizes the edits if the user hits enter afterwards or clicks on another column of the same table, which is not practical for my application.

I am looking for a way to commit the edits to the table either through a setting or scripting, without having to hit enter or click anywhere. (ie. run a script off my database update button that commits all open edits on the table when clicked)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 4, 2018, 4:29pm UTC](https://forum.inductiveautomation.com/t/commiting-table-edits-without-pressing-enter/21210/2 "2018-12-04T16:29:11Z")

</div>

Put a script somewhere (`initialize` would be a good event) that does the following:  
`table.putClientProperty("terminateEditOnFocusLost", True)`

where `table` is a reference to the table component (if you do use `initialize`, it will just be `self`.

---

<div class="post-metadata">

**Author:** ![Alexander41](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@Alexander41](https://forum.inductiveautomation.com/u/Alexander41)\
**Post date:** [December 4, 2018, 5:02pm UTC](https://forum.inductiveautomation.com/t/commiting-table-edits-without-pressing-enter/21210/3 "2018-12-04T17:02:55Z")

</div>

> I just tried this, unfortunately it doesn't seem to be working. Does the table need to be a power table for this command to work? (I am using a regular table for simplicity)

Edit: I was able to get it working by setting the property "Edit Click Count" to 0
