# When to refresh the binding on a table edited by multiple-clients?

**URL:** <https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652>\
**Category:** Ignition\
**Created:** [February 20, 2021, 4:28pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652 "2021-02-20T16:28:26Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [February 21, 2021, 9:04pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652/21 "2021-02-21T21:04:52Z")

</div>

> [@Transistor](#):
>
> Your approach seems to target them all individually.

Check my post edit, it's been updated to use session messages (instead of targeting each pageID individually).

> [@Transistor](#):
>
> Q1. Where does the _broadcastPerspectiveMessage_ code go? Scriptiong | Project Library or on the gateway?

Just somewhere in a script module (for the example I put it under _shared.util_).

> [@Transistor](#):
>
> Q2. You seem to be bypassing the Session Event message handler and going directly to the component message handler. Can you do that?

Yup, component message handlers are able to use the _Session_ listen scope.

---

<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:** [February 21, 2021, 9:15pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652/22 "2021-02-21T21:15:05Z")

</div>

Thank you, Ben. I have that working now.  
I like the id check so that we can discriminate between the originator and the other targets.

When I have this tidied-up I will post it as a complete configuration answer.

---

<div class="post-metadata">

**Author:** ![jsalas](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jsalas](https://forum.inductiveautomation.com/u/jsalas)\
**Post date:** [August 20, 2021, 6:56pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652/23 "2021-08-20T18:56:57Z")

</div>

Were you able to get this working?

---

<div class="post-metadata">

**Author:** ![Gavin\_Tipker](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@Gavin\_Tipker](https://forum.inductiveautomation.com/u/Gavin_Tipker)\
**Post date:** [November 29, 2023, 7:04pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652/24 "2023-11-29T19:04:04Z")

</div>

I'm looking to do something similar in my project. Where did you end up putting the broadcastPerspectiveMessage code? I was going to put it in my Project Library but realized system.perspective isn't available in the project library.

---

<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:** [November 29, 2023, 7:12pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652/25 "2023-11-29T19:12:28Z")

</div>

Functions in project libraries use the scope in which they are called, so if you call a function from a perspective scope, then `system.perspective.*` functions will be available. In fact if you read through @bmusson's posts you will see that he does have this function in a Project Library `shared.util`

> [@bmusson](#):
>
> > [@Transistor](#):
> >
> > Q1. Where does the _broadcastPerspectiveMessage_ code go? Scriptiong | Project Library or on the gateway?
> 
> Just somewhere in a script module (for the example I put it under _shared.util_).

However, if for some reason, you don't have access to the `system.perspective.sendMessage()` function, then messages sent with the proper scope and parameters with `system.util.sendMessage()` will also be "heard" from perspective. It's a little more involved to use, but can be made to work.

---

<div class="post-metadata">

**Author:** ![Gavin\_Tipker](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@Gavin\_Tipker](https://forum.inductiveautomation.com/u/Gavin_Tipker)\
**Post date:** [November 29, 2023, 7:18pm UTC](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652/26 "2023-11-29T19:18:29Z")

</div>

Oh, that makes sense. Thanks!

[Previous page](https://forum.inductiveautomation.com/t/when-to-refresh-the-binding-on-a-table-edited-by-multiple-clients/43652.md?page=1)
