# Message Handler to show selected Machine data in Flex Repeater

**URL:** <https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 31, 2023, 12:52pm UTC](https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134 "2023-07-31T12:52:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruchika](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ruchika](https://forum.inductiveautomation.com/u/Ruchika)\
**Post date:** [July 31, 2023, 12:52pm UTC](https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134/1 "2023-07-31T12:52:53Z")

</div>

Hello,  
We are trying to create a popup that allows user to select multiple machines using checkboxes. Based on the machines that are selected, we want to show data in our main view, which is a flex repeater.  
We are currently getting our machine data from database in a custom property using Query Binding. However, when we try to show data for selected machines in flex repeater using the custom property, it is showing for all the instances of custom property, not just the selected machines.

---

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [July 31, 2023, 1:08pm UTC](https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134/2 "2023-07-31T13:08:19Z")

</div>

Try to refresh the query binding after you have done the selection of machines in the popup.

---

<div class="post-metadata">

**Author:** ![Ruchika](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ruchika](https://forum.inductiveautomation.com/u/Ruchika)\
**Post date:** [July 31, 2023, 1:10pm UTC](https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134/3 "2023-07-31T13:10:00Z")

</div>

Actually, we are unable to figure out, how to show data in flex repeater based on selected machines from popup.

---

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [July 31, 2023, 1:15pm UTC](https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134/4 "2023-07-31T13:15:16Z")

</div>

Save the name or id of the selected machines. Then modify the query in such a way that only data of selected machines are fetched.

---

<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 31, 2023, 1:38pm UTC](https://forum.inductiveautomation.com/t/message-handler-to-show-selected-machine-data-in-flex-repeater/77134/5 "2023-07-31T13:38:46Z")

</div>

> [@Ruchika](#):
>
> We are currently getting our machine data from database in a custom property using Query Binding. However, when we try to show data for selected machines in flex repeater using the custom property, it is showing for all the instances of custom property, not just the selected machines.

Create a binding on `props.instances` to modify the instances to reflect what is in the custom property. If you expand the existing instances you will see the data structure required to be returned from your binding.

The instances will now update any time the custom variable changes.
