I’ve got a table whose data are based on a date field, so i created a binding on it.
There is also a button that adds a new row, so that when pressed I want to requery the table.
I tried with the following line of code in the button click event:
system.db.runPrepUpdate("INSERT INTO MYTABLE (COL1) VALUES (?)",[myNewData])
self.getSibling("lblDate").refreshBindings("props.value")
But it doesn’t work with the error:
org.python.core.PyException: AttributeError: 'com.inductiveautomation.perspective.gateway.script'
object has no attribute 'refreshBindings'
What is the name of the Table component? (That will be needed in the script.)
Did you fix the error? self.getSibling("Table").refreshBinding("props.data") ← Correct. self.getSibling("Table").refreshBindings("props.data") ← Wrong.
So either, the component which you have this script on does not have a sibling named ProductionTable or you have mispelled it. Use the property browser in script editor to get the correct path to the component that you are trying to refresh the binding on.