# Commit value of Perspective Table cell Edit on Click outside or other cell

**URL:** <https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 20, 2025, 2:22pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311 "2025-11-20T14:22:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samkcr](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Samkcr](https://forum.inductiveautomation.com/u/Samkcr)\
**Post date:** [November 20, 2025, 2:22pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311/1 "2025-11-20T14:22:42Z")

</div>

Hi Team,

I have a requirement to Edit the perspective Table cell. The table is SQL table.I have done that by writing the event scripts on EditCellCommit. After edit I need to press the enter to store the value in the cell. Now I want to commit the cell if I clicked outside or another cell. Is that achievable?

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [November 20, 2025, 2:41pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311/2 "2025-11-20T14:41:32Z")

</div>

Yes, but I think I’ve only achieved it by using a custom view for that cell with a TextField and `.onBlur()` handler.

---

<div class="post-metadata">

**Author:** ![Samkcr](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Samkcr](https://forum.inductiveautomation.com/u/Samkcr)\
**Post date:** [November 20, 2025, 2:48pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311/3 "2025-11-20T14:48:39Z")

</div>

Thanks for the reply

May I know little detail about that… So that I can try

Currently I have used the following script

```python
               
            # Convert dataset to Python list
                pyData = system.dataset.toPyDataSet(self.props.data)
            
                # Get edited cell details
                rowIndex = event.rowIndex
                colName = event.column
                newValue = event.value
            
                # Get primary key from the edited row
                idValue = pyData[rowIndex]["tankNo"]
                # Call Named Query
                system.db.runNamedQuery("tst", {
                    "Tankname": newValue,
                    "Tankno": idValue
                })
            
                # Refresh table data (important if query binding)
                self.refreshBinding("props.data")

```

Does it work with Focus Events () onBlur ?

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [November 20, 2025, 2:57pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311/4 "2025-11-20T14:57:29Z")

</div>

Create a custom view for the table column and apply it to the table using the table column `viewPath` property. Create a parameter to the view named `rowData`, then place a TextField in that view with its value bound to `view.params.rowData.tankNo`. Add an `onBlur` handler to the TextField that runs the query to update the database, and then calls `system.perspective.sendMessage('refresh-table')`. Add a message handler for `refresh-table` (or whatever you call it) on the table that invokes `self.refreshBinding("props.data")`.

Note that the cell will then always be rendered as a TextField, unless you do what I do and create a label for it, and toggle their views (use `onClick` on the label to make the TextField appear, and use the `onBlur` handler to switch back to showing the label).

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [November 20, 2025, 4:14pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311/5 "2025-11-20T16:14:22Z")

</div>

I’m interested in this too but it’s not worth applying views to every column in all my tables.

`onEditCellCommit` is great when the user hits [Enter].  
Testing with other events like `onKeyPress`, `onRowClick`, `onComposition*` and even change script events to the editingCell column and row properties don’t have a way to capture the uncommitted value.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [November 20, 2025, 4:25pm UTC](https://forum.inductiveautomation.com/t/commit-value-of-perspective-table-cell-edit-on-click-outside-or-other-cell/112311/6 "2025-11-20T16:25:23Z")

</div>

Yes, it shouldn’t have to be so difficult.

> **[Perspective Table Component Cell LostFocus Event | Ignition Features and Ideas...](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/perspective-table-component-cell-lostfocus-event)**
>
> Perspective Table Component would benefit from a Component Event for onEditCellLostFocus. This would allow for updating values to give a more Excel like
