Converting dropdown list dataset to JSON efficiently

Hello. This is my second forum post. I have a table which shows a dataset with a return format to JSON to allow onCellEditCommit to change the operators Skill Level on the job. There is also dropdowns used to add new operators to the specific line, workcenter and workstation. When they use the dropdown to select line, it filters to select only that line in the table (through a new dataset from a query selecting only Line = :Line). The same goes for workcenter (Line = :Line, Workcenter = :Workcenter), then workstation (Line = :Line, Workcenter = :Workcenter, Workstation = :Workstation) to narrow the table down for adding operators. When using the dropdown to filter the table, it returns a new dataset. I need this to return JSON to the table so that the onCellEditCommit will still work. If you attempt to edit the data on the table the way it is, you get this code:

Error running action 'component.onEditCellCommit' on Configuration/SkillMatrixInsert@D/root/Table: Traceback (most recent call last): File " ", line 4, in runAction TypeError: 'com.inductiveautomation.ignition.gateway.datasource.BasicStreamingDataset' object is unsubscriptable

Is there a workaround for this or is this method simply not going to work? I have tried using the return format on the dropdown as well as a transform script to make the dropdown convert to JSON, this doesn’t work either.

Need to see the script in onEditCellCommit.

The script simply allows me to edit the JSON table. It works until the filters return datasets.

#allows cell to be edited
valueToSet = event.value[event.row][event.column] = valueToSet
#sets edited value immediately -- otherwise have to click elsewhere to set[0].TrainingLevel = valueToSet

How are you running the filters?

When I need to filter, I return the entire dataset, and then filter it in a binding or script, as opposed to running another query. Either approach can work.

What did the transform that didn’t work look like?