# Perspective Editable Table

**URL:** <https://forum.inductiveautomation.com/t/perspective-editable-table/81349>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [November 2, 2023, 5:16am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349 "2023-11-02T05:16:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [November 2, 2023, 5:16am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/1 "2023-11-02T05:16:40Z")

</div>

Hi  
I have read a number of posts about editing tables in perspective, tried them all, and all failed. These posts were from over a year ago.  
Has there been changes to perspective in the last year?  
The most common error message is:  
Error running action 'component.onEditCellCommit' on F3 Views/F3\_1@D/root/root/materials container/Table: Traceback (most recent call last): File "function:runAction", line 4, in runAction TypeError: 'com.inductiveautomation.ignition.gateway.datasource.BasicStreamingDataset' object is unsubscriptable

Could someone suggest a method that works please?  
Ross

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [November 2, 2023, 7:22am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/2 "2023-11-02T07:22:11Z")

</div>

What script are you using in the `onEditCellCommit`

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 2, 2023, 8:29am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/3 "2023-11-02T08:29:02Z")

</div>

Looks like you're trying methods that expect the table's data property to be in json format, but you have a dataset instead.  
You can either change the format of your data, or modify the script to handle a dataset instead.

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [December 8, 2023, 3:33am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/4 "2023-12-08T03:33:34Z")

</div>

ok, thanks people  
it works now with JSON

---

<div class="post-metadata">

**Author:** ![jantonevich](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jantonevich](https://forum.inductiveautomation.com/u/jantonevich)\
**Post date:** [January 2, 2024, 3:54am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/5 "2024-01-02T03:54:24Z")

</div>

I am interested in this topic but there are no detail listed. can you please provide details about how this functions would be scripted on the onEditCellCommit for json and/or dataset?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 5, 2024, 10:14am UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/6 "2024-01-05T10:14:37Z")

</div>

What do you want to do exactly ?

---

<div class="post-metadata">

**Author:** ![jantonevich](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jantonevich](https://forum.inductiveautomation.com/u/jantonevich)\
**Post date:** [January 5, 2024, 8:57pm UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/7 "2024-01-05T20:57:53Z")

</div>

At this point, I don’t even have a starting point other than the need to edit table cells in my session, which was easy enough in vision but see no easy to moderate way to do it in perspective. Seem shortsighted for IA to not to be fairly simple to edit DB data when it is built around using DB data.

I was hoping for sample code to make this happen. If you can help id be most aprreciative.

Im a systems integrator, not a python, java, html ninja. It seems like after a number of years all decent integrator created hmi softwares get taken over by programmers and expect everyone else to be programmers like them. Ie -wonderware/Archestra, etc

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [January 5, 2024, 9:41pm UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/8 "2024-01-05T21:41:49Z")

</div>

Perspective does take a bit of a paradigm shift from Vision and it can be more challenging in some aspects, but easier in others.

When you say edit table cells, how do you want the operator to interact with the table to edit the data? What does the data look like in the table? Where is the data coming from?

---

<div class="post-metadata">

**Author:** ![jantonevich](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jantonevich](https://forum.inductiveautomation.com/u/jantonevich)\
**Post date:** [January 5, 2024, 9:56pm UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/9 "2024-01-05T21:56:42Z")

</div>

Thanks for the reply, ideally dblclick a cell to edit the value them commit on lost focus or simlilar. But selecting a cell or row and opening a popup to edit fields then saving would work too. Just something to edit individual cells on a table in a session.

![image001.png](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/68677b7e3d57a33216c12cab97068420a3dd31a6.png)

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [January 5, 2024, 10:24pm UTC](https://forum.inductiveautomation.com/t/perspective-editable-table/81349/10 "2024-01-05T22:24:34Z")

</div>

Like @bschroeder said, where is your data coming from? How the table gets it data and what you do with it can change the approach.  
This example used the default table with the columns defined and set to editable and an onCellEditCommit action script.  
[editableTable.zip](https://forum.inductiveautomation.com/uploads/short-url/AtVTR34WwWMYTSsplUjUpRulTsp.zip) (22.0 KB)

If your table is getting it's data from a query of sorts i write those changes back to the database then refresh the table binding.
