# Page Refresh after a DB Update

**URL:** <https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155>\
**Category:** Ignition\
**Created:** [June 24, 2022, 11:42am UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155 "2022-06-24T11:42:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 24, 2022, 11:42am UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/1 "2022-06-24T11:42:56Z")

</div>

In perspective, on updating a table in data base on a button click on a view that displays the table with a query binding, the table doesn't show the updated data! I want to refresh the page showing the updated table. I found a refresh query binding method in the documentation as follows:

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

But how to give the path to the binding!? The view is embedded inside a flex container whose instance is bound to the query.

Will refreshing the view not trigger the query once again? How to refresh the view (or page for that matter, if its not too expensive)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 24, 2022, 12:47pm UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/2 "2022-06-24T12:47:01Z")

</div>

You need to use `refreshBinding()` on the component that has the binding. How you get that component is up to you, If you are trying to update a component inside an embedded view from outside of it, I suspect that you would need to use `system.perspective.sendMessage()` with a message handler on the embedded view. Probably on the table but doesn’t have to be.

Then you can use some method of acquiring a reference to the component.

Some variant of `self.parent.getChild('ComponentName').refreshBinding('props.data')`

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 24, 2022, 5:06pm UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/3 "2022-06-24T17:06:30Z")

</div>

Yes that's it! Sending message and calling refreshBinding works just fine! I first tried refreshing the page but it does refresh the whole page with a blink but doesn't update the binding! Thanks a lot!

By the way how to achieve the same in vision pages?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 24, 2022, 5:08pm UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/4 "2022-06-24T17:08:47Z")

</div>

In vision you can use `system.db.refresh()` which despite the “db” will refresh any binding.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 24, 2022, 5:12pm UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/5 "2022-06-24T17:12:01Z")

</div>

Thanks, will try and update you. But will it update all query bindings? That would be too expensive!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 24, 2022, 5:19pm UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/6 "2022-06-24T17:19:44Z")

</div>

No you have to pass a reference to the component and property

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 24, 2022, 5:21pm UTC](https://forum.inductiveautomation.com/t/page-refresh-after-a-db-update/61155/7 "2022-06-24T17:21:23Z")

</div>

ok, got it, thanks a lot.
