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
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.
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?
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
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?
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.
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 (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.