refreshBinding not working probably because not called on the right object

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.
image
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'

Any idea?
Thanks in advance

You should be refreshing the table binding - not the lblDate binding.

1 Like

Refreshing the table binding? It makes sense.
So I tried this:

self.getSibling("Table").refreshBindings("props.data")

Same error:

AttributeError: 'com.inductiveautomation.perspective.gateway.script' object has no attribute 'refreshBindings'

It isn’t refreshBindings. There is no “s”

self.getSibling("Table").refreshBinding("props.data")
2 Likes