Table reload with button in Ignition Perspective

Hello!

I´ve got a button to reload the data binded to a table in Ignition Perspective.
The table name is tblSummary binded to a Named Query and when I click on the button "Cargar" I would like to reload the content from the db connection.
image

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

1 Like

Ok, thanks, following the user manual:

tblSummary is in same level as the button

thanks

No.
Button → Right-click → Configure Events → onActionPerformed → Script.
Add code.

1 Like

Ok, thanks, just added it.

self.getSibling("tblSummary").refreshBinding("props.data")

And ....?
If it doesn't work you need to tell us.

You are missing a tab before self.getSibling....

Doesn´t seem to work, table is not reloading

image

  1. Inspect the error.
  2. Read the message.
  3. Fix the problem.
1 Like

def runAction(self, event):
self.getSibling("tblSummary").refreshBinding("props.data")

k fixed that part

table doesnt seem to reload, i don´t really have a way to tell as the Named Query is not changing now, i go to last page of table and reload and keep there.

See Wiki - how to post code on this forum. If you don't format code properly we can't see leading spaces and tabs. There is a pencil icon to fix your post.

It should look like this:

def runAction(self, event):
    self.getSibling("tblSummary").refreshBinding("props.data")
1 Like