# Perspective Table - refreshBinding from button not working

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [May 26, 2023, 2:41pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223 "2023-05-26T14:41:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaunstewart](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shaunstewart](https://forum.inductiveautomation.com/u/shaunstewart)\
**Post date:** [May 26, 2023, 2:41pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/1 "2023-05-26T14:41:10Z")

</div>

Im trying to refresh a binding i have on a Perspective Tables "props.data" from a button and cant get it to work. Im using a message handler on the Table and calling it from the button. My binding on props.data is a dataset tag that has a script transform that changes rows background color based on a value, so its not a polled binding like a query or history( not sure if this is the issue)

Script on Table:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/6/e6354336557c6cef05f8e57501bdba572bf24d39.png)

Script on Button:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7f3e19f4dcc5036abb93e6dd56e31e543be518f.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 26, 2023, 4:37pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/2 "2023-05-26T16:37:52Z")

</div>

Start by adding some logging in your message handler to see if it does catch the message.

In the (probable) case it doesn't, check the scope, and try a handler name without spaces.

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [May 26, 2023, 5:45pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/3 "2023-05-26T17:45:45Z")

</div>

May need to define the scope..

[https://docs.inductiveautomation.com/display/DOC81/system.perspective.sendMessage](https://docs.inductiveautomation.com/display/DOC81/system.perspective.sendMessage)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 28, 2023, 12:06am UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/4 "2023-05-28T00:06:35Z")

</div>

If you're bound to a tag, then you'll always have the latest value. Refreshing the Binding will do nothing because if neither the value nor quality change the binding won't update. Are you just trying to re-execute the transform of the binding?

---

<div class="post-metadata">

**Author:** ![shaunstewart](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shaunstewart](https://forum.inductiveautomation.com/u/shaunstewart)\
**Post date:** [May 30, 2023, 12:39pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/5 "2023-05-30T12:39:38Z")

</div>

> [@cmallonee](#):
>
> or

yes i am trying to re-execute the transform.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 30, 2023, 1:24pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/6 "2023-05-30T13:24:45Z")

</div>

Use a structure binding instead then.  
Structure bindings have several sources of data, when any of them is updated the whole thing is re-evaluated.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 30, 2023, 2:43pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/7 "2023-05-30T14:43:37Z")

</div>

As @pascal.fragnoud suggested, it sounds like an Expression Structure binding is going to work best for you. From the request, it sounds like your displayed data is not strictly reliant on the data of the Tag, rather, it is reliant on the Tag AND some other information. As such, a regular binding with a Transform won't work for you.

Optionally, you could use the Tag binding, and instead of "refreshing" the binding, you could place the transform code into a project script and reference that script in the transform. Then, your button press would not refresh the binding, it would actually SET the data of the Table be reading the Tag data and referncing the project script before then applying the data to the Table: `self.getSibling("Table").props.data = X`.

---

<div class="post-metadata">

**Author:** ![shaunstewart](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shaunstewart](https://forum.inductiveautomation.com/u/shaunstewart)\
**Post date:** [May 31, 2023, 1:59pm UTC](https://forum.inductiveautomation.com/t/perspective-table-refreshbinding-from-button-not-working/74223/8 "2023-05-31T13:59:36Z")

</div>

Thanks everyone for your inputs, i ended up changing the main binding tag path of the table to the tag that actually changes and reworked my transform script to include my dataset so now the tag binding changes thus the transform script executes again.
