# How to refresh binding after clicking button on popup

**URL:** <https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 12, 2022, 7:11pm UTC](https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515 "2022-12-12T19:11:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cory\_McMahon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory_mcmahon/32/41826_2.png) [@Cory\_McMahon](https://forum.inductiveautomation.com/u/Cory_McMahon)\
**Post date:** [December 12, 2022, 7:11pm UTC](https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515/1 "2022-12-12T19:11:53Z")

</div>

I am working on a project and have a confirmation popup with information to be entered. The button then commits data to database and another popup opens with success or fail message and an ok button. On the confirmation popup after click of the button I'd like to refresh binding on previous page table. I have looked at [system.perspective.refresh](https://docs.inductiveautomation.com/display/DOC81/system.perspective.refresh), can't get the right pageId, Caused by: java.lang.IllegalArgumentException: Page "EMBEDED\Scheduler..." not found. I set pathId variable to the path of the page in the above error message.

---

<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:** [December 12, 2022, 7:41pm UTC](https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515/2 "2022-12-12T19:41:01Z")

</div>

You can achieve this easy with message handlers..

Right click on your table or the thing you want to refresh to add your refresh script under configure scripts. For example

```auto
self.refreshBinding("props.data")

```

Then on your confirmation button fire that script. For example

```auto
system.perspective.sendMessage(messageType='Refresh Table',payload={},scope='page')

```

[https://docs.inductiveautomation.com/display/DOC81/Component+Message+Handlers](https://docs.inductiveautomation.com/display/DOC81/Component+Message+Handlers)

---

<div class="post-metadata">

**Author:** ![Cory\_McMahon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory_mcmahon/32/41826_2.png) [@Cory\_McMahon](https://forum.inductiveautomation.com/u/Cory_McMahon)\
**Post date:** [December 12, 2022, 8:55pm UTC](https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515/3 "2022-12-12T20:55:22Z")

</div>

> [@craigb](#):
>
> `self.refreshBinding("props.data")`

Thank you very much! That's what I needed.

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 13, 2022, 3:10am UTC](https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515/4 "2022-12-13T03:10:57Z")

</div>

Note that "self" needs to be for the component that has the binding you want refreshed.  
So if the you had a button component and wanted to refresh a binding on a property for table component named "myTable", you might need to do something like:

In the button's onActionPerformed() handler:

```auto
tblSelf = self.getSibling("MyTable")
tblSelf.refreshBinding("props.data")

```

getSibling might need to be replace with what ever pathing to get from the button to the table.

Using messages and handlers as craigb suggests would allow you to avoid the component pathing, but I often find it's overkill.

HTH.  
-Shane

---

<div class="post-metadata">

**Author:** ![Josue\_Cuadras](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/josue_cuadras/32/59915_2.png) [@Josue\_Cuadras](https://forum.inductiveautomation.com/u/Josue_Cuadras)\
**Post date:** [August 18, 2023, 6:50pm UTC](https://forum.inductiveautomation.com/t/how-to-refresh-binding-after-clicking-button-on-popup/67515/5 "2023-08-18T18:50:07Z")

</div>

Thanks!
