# View to flex repeater

**URL:** <https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [June 7, 2024, 6:33am UTC](https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530 "2024-06-07T06:33:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Rodolfo\_Mutuc](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jose\_Rodolfo\_Mutuc](https://forum.inductiveautomation.com/u/Jose_Rodolfo_Mutuc)\
**Post date:** [June 7, 2024, 6:33am UTC](https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530/1 "2024-06-07T06:33:16Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/3/e30ee94946ed222fd24f21fef55ba5d6f62b607d.png)  
base on the view . when i use it for flex repeater it possible how to know that i selected or click?

---

<div class="post-metadata">

**Author:** ![Jose\_Rodolfo\_Mutuc](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jose\_Rodolfo\_Mutuc](https://forum.inductiveautomation.com/u/Jose_Rodolfo_Mutuc)\
**Post date:** [June 7, 2024, 6:40am UTC](https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530/2 "2024-06-07T06:40:11Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e592e79ca6f1533336930a2868560adc1de848d6.png)

---

<div class="post-metadata">

**Author:** ![Steven\_Cheron](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@Steven\_Cheron](https://forum.inductiveautomation.com/u/Steven_Cheron)\
**Post date:** [June 7, 2024, 5:12pm UTC](https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530/3 "2024-06-07T17:12:30Z")

</div>

I don't understand what you want.

You want to know on which instance you have clicked ?

If yes, you can use the `system.perspective.sendMessage()` to send information from the instance to the flex container. And then in the flex container use a message Handler to received the information sent from the intances.

[https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-sendMessage](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-sendMessage)

[https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/component-message-handlers](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/component-message-handlers)

---

<div class="post-metadata">

**Author:** ![Nick\_Wilson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nick_wilson/32/80663_2.png) [@Nick\_Wilson](https://forum.inductiveautomation.com/u/Nick_Wilson)\
**Post date:** [June 7, 2024, 5:33pm UTC](https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530/4 "2024-06-07T17:33:38Z")

</div>

Create a view parameter on your flex repeater instance view called "index". Assign a unique value to the "index" parameter for each flex repeater instance in the flex repeater's "props.instances" property. Write an "onClick" event script on the root container of your flex repeater instance view that sends a message which contains "self.view.params.index" (and any other properties that you want to pass) in its payload. Create a message handler somewhere in the view containing the flex repeater and take the payload's "index" value from there.

---

<div class="post-metadata">

**Author:** ![Steven\_Cheron](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@Steven\_Cheron](https://forum.inductiveautomation.com/u/Steven_Cheron)\
**Post date:** [June 7, 2024, 5:38pm UTC](https://forum.inductiveautomation.com/t/view-to-flex-repeater/91530/5 "2024-06-07T17:38:44Z")

</div>

If you do not defined `index` in the instance parameter, it will be automatically set to the position in the flex repeater.

Just create `index` in the view inside the flex repeater
