# System.db.refresh

**URL:** <https://forum.inductiveautomation.com/t/system-db-refresh/10613>\
**Category:** Ignition\
**Created:** [October 13, 2015, 1:23pm UTC](https://forum.inductiveautomation.com/t/system-db-refresh/10613 "2015-10-13T13:23:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_newb](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@the\_newb](https://forum.inductiveautomation.com/u/the_newb)\
**Post date:** [October 13, 2015, 1:23pm UTC](https://forum.inductiveautomation.com/t/system-db-refresh/10613/1 "2015-10-13T13:23:12Z")

</div>

If I am running the system.db.refresh command through a buttons script on one window, is it possible to update a component on another window?

I have a table that displays some information that it gets through a query. To add information into the database I click a button, a popup opens, the data is entered, then a ‘Save’ button is pressed that updates/inserts data into the data base. I would also like it to refresh the table on the other screen.

I have it working by closing and reopening the other window, but is seems like refreshing it would be the way to go.

Thanks…

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [October 13, 2015, 1:54pm UTC](https://forum.inductiveautomation.com/t/system-db-refresh/10613/2 "2015-10-13T13:54:43Z")

</div>

You would do this by getting a reference to the other window, getting a reference to the table and then refreshing the table’s data property. Your script (which should be run by your Save button) should look something like the following:`window = system.gui.getWindow('other_window_name')
table = window.getRootContainer().getComponent('table_name')
system.db.refresh(table, 'data')`

---

<div class="post-metadata">

**Author:** ![the\_newb](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@the\_newb](https://forum.inductiveautomation.com/u/the_newb)\
**Post date:** [October 13, 2015, 2:53pm UTC](https://forum.inductiveautomation.com/t/system-db-refresh/10613/3 "2015-10-13T14:53:12Z")

</div>

That works great! Thank you!
