Error running action 'component.onEditCellCommit' on site-views/production/production-setup@D/root/Table_0: Traceback (most recent call last): File "<function:runAction>", line 2, in runAction TypeError: 'com.inductiveautomation.ignition.common.BasicDataset' object is unsubscriptable
I have tried this method on the default table that you can drag in from the components pallet & it does work, so this makes me think that doing this with the dataset linked to the data prop is the issue.
How can I solve this problem - I did search the docs and did not find anything so if documentation does exist, apologies, please point me in the right direction
It works on the default table because the data is in a JSON format, while you're specified your data is a DataSet. DataSets are indeed unsubscriptable in this manner, and I believe they are also immutable.
Assuming you are reading this data from a tag with a path of [default]ABC/XYZ, try this:
def runAction(self.event):
# be wary of whitespace differences when copying code from the forums
tagPath = "[default]ABC/XYZ"
updatedDataset = system.dataset.setValue(self.props.data, event.row, event.column, event.value)
system.tag.writeBlocking([tagPath], [updatedDataset])