# Update Table on Different Window

**URL:** <https://forum.inductiveautomation.com/t/update-table-on-different-window/12207>\
**Category:** Ignition\
**Created:** [October 6, 2016, 2:42pm UTC](https://forum.inductiveautomation.com/t/update-table-on-different-window/12207 "2016-10-06T14:42:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [October 6, 2016, 2:42pm UTC](https://forum.inductiveautomation.com/t/update-table-on-different-window/12207/1 "2016-10-06T14:42:11Z")

</div>

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

Typically I use this when table is on same window:

```auto
# 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.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 6, 2016, 3:06pm UTC](https://forum.inductiveautomation.com/t/update-table-on-different-window/12207/2 "2016-10-06T15:06:25Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 6, 2016, 3:08pm UTC](https://forum.inductiveautomation.com/t/update-table-on-different-window/12207/3 "2016-10-06T15:08:44Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [October 6, 2016, 7:07pm UTC](https://forum.inductiveautomation.com/t/update-table-on-different-window/12207/4 "2016-10-06T19:07:59Z")

</div>

[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
