Issue with refreshing a dataset of a table in script

I have the following script in the click event of a button to refresh the data in a table

system.db.refresh(table, "data") 

I see the following error in the Gateway logger.

com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File “”, line 13, in runAction AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘refresh’

at org.python.core.Py.AttributeError(

at org.python.core.PyObject.noAttributeError(

at org.python.core.PyObject.getattr(

at org.python.pycode._pyx51.runAction$1(:13)

at org.python.pycode._pyx51.call_function()



at org.python.core.PyFunction.function___call__(




at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(

at com.inductiveautomation.ignition.common.script.ScriptManager$ScriptFunctionImpl.invoke(

at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(

at com.inductiveautomation.perspective.gateway.action.ScriptAction.runAction(

at com.inductiveautomation.perspective.gateway.action.ActionDecorator.runAction(

at com.inductiveautomation.perspective.gateway.action.SecuredAction.runAction(

at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$ExecuteActionsTask.lambda$call$0(

at com.inductiveautomation.perspective.gateway.api.LoggingContext.mdc(

at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$

at com.inductiveautomation.perspective.gateway.model.ActionCollection$ActionSequence$

at com.inductiveautomation.perspective.gateway.threading.BlockingTaskQueue$

at java.base/java.util.concurrent.Executors$ Source)

at java.base/ Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)

at java.base/ Source)

Caused by: org.python.core.PyException: Traceback (most recent call last): File “”, line 13, in runAction AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘refresh’

… 27 common frames omitted

system.db.refresh() is a Vision client only command. To perform the equivalent in Perspective, just use someComponent.refreshBinding("path") - the component can be any component reference, and path is just the path to the particular property.


Thanks for your suggestion. It worked. Here is what I did,



Paul, can you talk to the documentation team and have them add someComponent.refreshBinding("path") to the user manual? I searched for refreshBinding, but it found nothing. The tool is incredibly helpful!

Let’s say the binding is to a named query with caching enabled. Is there a way to refresh the binding and force it to bypass caching? I noticed that is an option in the binding itself. This would be helpful if I a table displaying the content of a database table along side a form that is used to update a record in the table.

Not at present, although you could use system.db.clearNamedQueryCache() to invalidate the cache.

That worked perfectly! Thank you!

I’m now running into an issue in my project after I moved my view to a global project. My project now inherits this view from the global project. For some reason the cache no longer clears and I’m not getting any errors in the log. Thoughts?

Please elaborate it with an example. I didn’t follow, someComponent? and “path”?. I am having a similar problem in perspective where I have the following components - cooordinate container, a label, a hyperlink, a table component (the contents needs to be refreshed after certain action) and a date input component.

You provided more information, but not enough for me to tell you how to actually solve your problem.

You need to start from a reference to whatever component has the binding you want to re-run. You can use the property selector helper in the script editor to get one - just select a property and remove the end of the path.

And “path” is just the path to the property that contains the binding. Such as props.value for a simple case like a text field, or for a table’s main data property.

Thanks, I am able to refresh it now

1 Like