Refreshing a table from a popup window

I recently helped a customer set up a table’s popup window editor to refresh the table on a change. At the end of your editing code, add the following:

#Update table's dataSet in other window try: window = fpmi.gui.getWindow('table_window') except ValueError: pass else: table = window.getRootContainer().getComponent('myContainer').getComponent('myTable') fpmi.db.refresh(table, "data")

If the window is open, the script gets the table and updates it’s dataSet.

Another important consideration for this type of setup is to ensure that the SQL binding(s) of the popup have Polling Off. The last thing a user wants is to have his new values overwritten by a timed DB poll before having a chance to submit the request.

1 Like