# How to get selected instance name in flex repeater

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-selected-instance-name-in-flex-repeater/82246>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [November 22, 2023, 11:08am UTC](https://forum.inductiveautomation.com/t/how-to-get-selected-instance-name-in-flex-repeater/82246 "2023-11-22T11:08:48Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [November 22, 2023, 11:52am UTC](https://forum.inductiveautomation.com/t/how-to-get-selected-instance-name-in-flex-repeater/82246/5 "2023-11-22T11:52:46Z")

</div>

> [@Priyanka.Khandge](#):
>
> Any idea how to get the selected instance name in Flex repeater?

If you want the main view to know which repeater view has been selected then I would use [system.perspective.sendMessage](https://docs.inductiveautomation.com/display/DOC80/system.perspective.sendMessage) in an onClick event on the root of the embedded view.

```auto
def runAction(self, event):
	role = self.view.params.role
	system.perspective.sendMessage("repeaterViewClicked", {"role": role}, scope = "page")

```

Then use a message handler on the component in the main view that needs the information. Be sure to set the listen scope to "Page".

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-get-selected-instance-name-in-flex-repeater/82246)._
