# Perspective table script to refresh a table.props.selection.data (no binding on this property)

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-script-to-refresh-a-table-props-selection-data-no-binding-on-this-property/34789>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 15, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/perspective-table-script-to-refresh-a-table-props-selection-data-no-binding-on-this-property/34789 "2020-05-15T16:43:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guganathan.r](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@guganathan.r](https://forum.inductiveautomation.com/u/guganathan.r)\
**Post date:** [May 15, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/perspective-table-script-to-refresh-a-table-props-selection-data-no-binding-on-this-property/34789/1 "2020-05-15T16:43:04Z")

</div>

Can anyone help to get me a code to refresh a “table.props.selection.data” ?  
Please note that there is no binding on this property.

I noticed this selection.data gets updated only when the table row is clicked. But I want to refresh this selection.data with a script.

Objective: Please advise if this is correct method.  
I want to update the table in all sessions when there is an update from other sessions/users. Polling avoided to reduce query load.  
I have created a memory tag with datetime format and tag.write system.date.now() to this tag on every insert or update on any session.  
In view where table is located, created a label and bind to the memory tag.  
Added a change script on this label component to refresh table.props.data.  
table.refreshBinding(“props.data”) is successful, however there is a text field component to display the selected Row value, since the selection.data array does not get updated it shows old data.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8d562ef0d4b47f0bd9bf89adcce6fec29536c75c.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 15, 2020, 10:49pm UTC](https://forum.inductiveautomation.com/t/perspective-table-script-to-refresh-a-table-props-selection-data-no-binding-on-this-property/34789/2 "2020-05-15T22:49:57Z")

</div>

Sounds like a bug. As a workaround, you might need to script the re selection of the selected rows as well

---

<div class="post-metadata">

**Author:** ![guganathan.r](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@guganathan.r](https://forum.inductiveautomation.com/u/guganathan.r)\
**Post date:** [May 16, 2020, 6:05am UTC](https://forum.inductiveautomation.com/t/perspective-table-script-to-refresh-a-table-props-selection-data-no-binding-on-this-property/34789/3 "2020-05-16T06:05:21Z")

</div>

Hi @nminchin,  
Thanks for prompt response.  
Yes it looks like a bug.  
Even if I write a script to capture selectedRow and reassign the same to table again, selection.data is not updated with new props.data.  
Infact made the table.selectedRow = None and reassinged on same script didnot work.  
Basically, any property value that we reassign the same value to the table with script doesn’t change selection.data

Only workaround I found is to assign a different selectedColumn, it updates the selection.data  
Everytime you need to assign a new selectedColumn name so the selection.data is updated on every trigger.
