# Use a Flex Repeater to select Details

**URL:** <https://forum.inductiveautomation.com/t/use-a-flex-repeater-to-select-details/49371>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [July 29, 2021, 8:07pm UTC](https://forum.inductiveautomation.com/t/use-a-flex-repeater-to-select-details/49371 "2021-07-29T20:07:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stan.cook](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stan.cook/32/10553_2.png) [@stan.cook](https://forum.inductiveautomation.com/u/stan.cook)\
**Post date:** [July 29, 2021, 8:07pm UTC](https://forum.inductiveautomation.com/t/use-a-flex-repeater-to-select-details/49371/1 "2021-07-29T20:07:55Z")

</div>

Is it possible to know which embedded view of a Perspective Flex Repeater has been selected? I want an event script when the repeater is clicked which will ‘send’ a value to an adjacent “detail” view. The detail will show data dependent on which subview was picked.  
The value I pass will be a subview custom parameter and will be called out in the Flex Repeater instance detail.  
I was planning to make a custom parameter on the Flex Repeater which the detail view would reference.  
“subview” is referring to the embedded view of the Flex Repeater)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [July 29, 2021, 8:10pm UTC](https://forum.inductiveautomation.com/t/use-a-flex-repeater-to-select-details/49371/2 "2021-07-29T20:10:47Z")

</div>

> [@Flex Repeater - Get Selected Instance](https://forum.inductiveautomation.com/t/flex-repeater-get-selected-instance/29847/2):
>
> Short answer: no. Long answer: Don't rely on the Flex Repeater to handle this for you; let your Views do the work with Message Handlers. Setup: Let the View being instanced accept a param (like index - this param is passed along free for all instances of the Flex Repeater without you needing to supply anything yourself). [17%20AM] on the ROOT node of the View, configure an onClick event to execute a Script Action with the following code: system.perspective.sendMessage('ROOTCLICK', payload=…

---

<div class="post-metadata">

**Author:** ![stan.cook](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stan.cook/32/10553_2.png) [@stan.cook](https://forum.inductiveautomation.com/u/stan.cook)\
**Post date:** [July 30, 2021, 1:44pm UTC](https://forum.inductiveautomation.com/t/use-a-flex-repeater-to-select-details/49371/3 "2021-07-30T13:44:50Z")

</div>

Thank you, that does what I wanted. FYI your sendMessage code snippet has a typo, there should be an “=” after “payload” (that’s for the next viewer of this answer).  
I started by trying to script the embedded view, but I couldn’t figure how to get the data to another view. This works and seems efficient.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [July 30, 2021, 2:25pm UTC](https://forum.inductiveautomation.com/t/use-a-flex-repeater-to-select-details/49371/4 "2021-07-30T14:25:35Z")

</div>

Updated, thank you.
