Popup window to db.refresh table on main window?

Hello,

I have a table on the main window which reflects a db. I have a button which opens a popup window with input fields (just a form) etc for adding to the DB (table on the main window).

Once all the fields are filled in the operator presses the “add record” button which performs the SQL query that adds it to the DB and calls a close popup function at the end.

Now to see the new record in the table you have to wait for the poll rate to update it (looks laggy).

Can I somehow get the final part of the SQL script on the popup form to execute a db.refresh on the table ON THE MAIN WINDOW. I can’t seem to work out the event objects to do this.

Cheers.

Mat Kent.

Hi Mat Kent,

In the popup window script use the system.gui.getWindow(name) function to get the main window.

For example:

Cheers,
Nick

Thank you for your help Nick, this works perfectly :slight_smile:

Has this been updated for future versions of Ignition? This doesn’t seem to fire for me when I try it.