Code Error on refreshBinding for a tag with a dataset

Hi Everyone!
So, I am in the middle of a project where I am now using tags instead of queries. So long story short, I created a tag with a dataset that allows the user to update the cell value in the table, great. Now I am at the part where I am attempting to refresh the dataset in the tag binding with the new input value. My code currently looks like this:

def runAction(self, event):
	row = event.row
	col = event.column
	value = event.value
	dsTagName = '[MorningMeetings]Dash/QualityTag'
	updatedDataset = system.dataset.setValue(self.props.data, row, col, value)
	system.tag.writeBlocking(dsTagName, [updatedDataset])
	component = self.getSibling('Quality_Table)
	component.refreshBinding('[MorningMeetings]Dash/QualityTag')

However, the problem occurs on the last line. There is a red squiggle under the final ")" and I'm not sure if it is possible to update a tag like this. When I run the code, the error message doesn't compile. More specifically it looks like this:

16:06:03.776 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - Unable to run action 'component.onEditCellCommit' on White_Board/DashBoard@D/root/Three/Quality/Quality Table: code could not be compiled.
com.inductiveautomation.ignition.common.GenericTransferrableException: SyntaxError: no viable alternative at input '\n' (<function:runAction>, line 10)
   at org.python.core.ParserFacade.fixParseError(ParserFacade.java:95)
   at org.python.core.ParserFacade.parse(ParserFacade.java:205)
   at org.python.core.Py.compile_flags(Py.java:2252)
   at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:899)
   at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.compileFunctionSuper(ProjectScriptLifecycle.java:809)
   at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$AutoRecompilingScriptFunction.getOrCreateDelegate(ProjectScriptLifecycle.java:925)
   at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$AutoRecompilingScriptFunction.<init>(ProjectScriptLifecycle.java:916)
   at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.compileFunction(ProjectScriptLifecycle.java:789)
   at com.inductiveautomation.ignition.common.script.ScriptManager.compileFunction(ScriptManager.java:882)
   at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.lambda$invoke$0(ScriptFunctionHelper.java:114)
   at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(Unknown Source)
   at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:107)
   at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:97)
   at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(ScriptAction.java:74)
   at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(ActionCollection.java:263)
   at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(LoggingContext.java:54)
   at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:252)
   at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.call(ActionCollection.java:221)
   at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$TaskWrapper.run(BlockingTaskQueue.java:154)
   at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
   at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at com.inductiveautomation.perspective.gateway.threading.BlockingWork$BlockingWorkRunnable.run(BlockingWork.java:58)
   at java.base/java.lang.Thread.run(Unknown Source)

I am still looking into the problem, but any help would be great!
Thank you!

Tag bindings auto-update when something changes the tag value. No refresh required.

oh ok then. So I would just need to update the table, correct?

If the table is bound to the tag, it will auto-update.

My current window still does not auto update the values. For example. if I type 5 in any of the cells, my own personal screen will update but not for another session. That is the end goal.

Should be:

system.tag.writeBlocking([dsTagName], [updatedDataset])

oh wait. I was on the wrong window with a similar project name. never mind. Thank you for the help!

For future reference, your code was failing to compile because of this line:

component = self.getSibling('Quality_Table)

See how the last paren is red? You didn't close the string contained within.

3 Likes