# Set Window to Always Updating

**URL:** <https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856>\
**Category:** Ignition\
**Created:** [January 13, 2012, 3:51pm UTC](https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856 "2012-01-13T15:51:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nate.Olson](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nate.Olson](https://forum.inductiveautomation.com/u/Nate.Olson)\
**Post date:** [January 13, 2012, 3:51pm UTC](https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856/1 "2012-01-13T15:51:36Z")

</div>

Is there a way to set a window to always updating? I have a table that is populating based on client event scripts, but if that window isn’t in the foreground the tables won’t update.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 13, 2012, 4:11pm UTC](https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856/2 "2012-01-13T16:11:26Z")

</div>

So, the table’s data property is not bound to a polling SQL query but rather set from a client event script? If so, can you post an example of the script?

---

<div class="post-metadata">

**Author:** ![Nate.Olson](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nate.Olson](https://forum.inductiveautomation.com/u/Nate.Olson)\
**Post date:** [January 13, 2012, 4:17pm UTC](https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856/3 "2012-01-13T16:17:36Z")

</div>

Hello,

This is the Client Event Script I am running, it is triggered when a step/index changes in the PLC. I can’t seem to update my table with the new dataset unless my window is in the foreground.

Thanks.

#Set the index based on the tag value that changed  
index = newValue.value  
#Set the window  
window = system.gui.getWindow(‘Main Control’)

#TimeSP  
TimeSP = float(system.tag.getTagValue(“PLC/SM\_STATE\_LIST/SM\_STATE\_LIST\_” + str(index) + “_/TimeInStateSP"))  
 #Description  
Description = system.tag.getTagValue("PLC/SM\_STATE\_LIST/SM\_STATE\_LIST_” + str(index) + “\_/StateName/STRING”)

#Create the row data array  
newRow = [TimeSP,Description]  
#Create a new dataset with the added row  
updatedDS = system.dataset.addRow(window.getRootContainer().getComponent(‘tblCycles’).data, newRow)  
#Update the table with the new dataset  
window.getRootContainer().getComponent(‘tblCycles’).data = updatedDS

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [January 13, 2012, 6:15pm UTC](https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856/4 "2012-01-13T18:15:59Z")

</div>

How about this…

instead of updating the table directly, update a client tag instead (client tags may be datasets). Then you can bind the table to the client tag and… and… I was trying for a climactic finish, but that’s pretty much it. 😆

If you update a tag instead, it’s not relying on the window to be front and center.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [January 13, 2012, 7:01pm UTC](https://forum.inductiveautomation.com/t/set-window-to-always-updating/3856/5 "2012-01-13T19:01:19Z")

</div>

We went over this in a support call and got it solved. We bound the client tag to the root container and added the script to a propertyhange event. But for the original problem: the table does update if the window is in the background.
