Update Table on Different Window

How do I update a table component that is on a different window?

Typically I use this when table is on same window:

# refresh running status table in Action Container
table = event.source.parent.parent.getComponent('Action').getComponent('FermTankIng')
	# refresh table
system.db.refresh(table, "data")

But, I have created a popup form used to edit the selected row in the table. On the form is an Update button, and I want the table on the parent window to update only when the Update button is pressed.

I don’t want to continually run the SQL query on the table component.

You can probably use system.gui.getOpenedWindows() or system.gui.findWindow(path) to obtain an instance of the windows where the table component is located, and then get your table component ?

It would look like:[code]otherWindow = system.gui.getWindow(‘otherWindowName’)
table = otherWindow.rootContainer.getComponent(‘Action’).getComponent(‘FermTankIng’)

refresh table

system.db.refresh(table, “data”)[/code]

[quote=“pturmel”]It would look like:[code]otherWindow = system.gui.getWindow(‘otherWindowName’)
table = otherWindow.rootContainer.getComponent(‘Action’).getComponent(‘FermTankIng’)

refresh table

system.db.refresh(table, “data”)[/code][/quote]

Thanks