# refreshBinding strategy

**URL:** <https://forum.inductiveautomation.com/t/refreshbinding-strategy/93496>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 20, 2024, 6:19am UTC](https://forum.inductiveautomation.com/t/refreshbinding-strategy/93496 "2024-07-20T06:19:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [July 20, 2024, 6:19am UTC](https://forum.inductiveautomation.com/t/refreshbinding-strategy/93496/1 "2024-07-20T06:19:21Z")

</div>

I have some database tables that are used in tables.props.data on many pages  
To avoid having multiple sql reads, 1 per table, I figured I would put a single custom prop in the perspective session, then refer back to this custom prop from all my tables

When I do a refreshBinding on any of the tables, it does not seem to trigger a refresh on the session custom prop.

Is my strategy sound? Am I expecting too much?

If not, how do I fire the refresh on the custom prop?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 20, 2024, 11:19am UTC](https://forum.inductiveautomation.com/t/refreshbinding-strategy/93496/2 "2024-07-20T11:19:37Z")

</div>

Your strategy sounds good.

The code you want is,  
`self.session.refreshBinding("custom.myCustomPropName")`

Usually this would be set up as shown below.

 ![Refresh sql binding](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b03f740b2edc6695d4545863dec42f9d3a3f59e1.png)

Generally, if a component has one or more bindings then it is monitoring for changes in any of them and will re-evaluate when any changes. That means that if your tables have a reference to your SQL query custom property in a binding that you only need to refresh the custom property and everything will be re-evaluated. (You should double-check this is true if the _value_ of the custom prop remains the same after refresh - I'm not sure.)

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [July 20, 2024, 10:52pm UTC](https://forum.inductiveautomation.com/t/refreshbinding-strategy/93496/3 "2024-07-20T22:52:09Z")

</div>

Thank you  
I'll check it out

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 20, 2024, 11:07pm UTC](https://forum.inductiveautomation.com/t/refreshbinding-strategy/93496/4 "2024-07-20T23:07:25Z")

</div>

Tip: Use the "Reply" link embedded in the bottom of a post if you want the user to receive an inbox notification. Alternatively, use the `@username` syntax. I only happened to find your reply.
