# Flex Repeater events

**URL:** <https://forum.inductiveautomation.com/t/flex-repeater-events/87938>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 27, 2024, 1:55am UTC](https://forum.inductiveautomation.com/t/flex-repeater-events/87938 "2024-03-27T01:55:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [March 27, 2024, 1:55am UTC](https://forum.inductiveautomation.com/t/flex-repeater-events/87938/1 "2024-03-27T01:55:40Z")

</div>

Hi  
I am using flex repeater.  
When I get a click event on the flex repeater, is there any way I can identify which of the instances generated the click?  
Reason is, when I add the instances to the flex repeater I add some additional attributes to the instance and I would like to access these attributes from the click

Thanks

---

<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:** [March 27, 2024, 2:46am UTC](https://forum.inductiveautomation.com/t/flex-repeater-events/87938/2 "2024-03-27T02:46:49Z")

</div>

See this post for how to allow the instanced View to self-report a click event and how to inform the Flex Repeater: [How to get the View Canvas selected instance index number - #2 by cmallonee](https://forum.inductiveautomation.com/t/how-to-get-the-view-canvas-selected-instance-index-number/85011/2)

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [March 27, 2024, 3:18am UTC](https://forum.inductiveautomation.com/t/flex-repeater-events/87938/3 "2024-03-27T03:18:16Z")

</div>

Thank you

1. Does this apply to Flex Repeater?
2. You say in [How to get the View Canvas selected instance index number](https://forum.inductiveautomation.com/t/how-to-get-the-view-canvas-selected-instance-index-number/85011) that " The Flex Repeater does have an `onInstanceClick` Event" but I cannot find that event

All need to do is identify which instance on Flex Repeater initiated the click. Maybe messaging is the way to go?

Thanks

---

<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:** [March 27, 2024, 8:41am UTC](https://forum.inductiveautomation.com/t/flex-repeater-events/87938/4 "2024-03-27T08:41:31Z")

</div>

See also my suggestion in [Perspective Text Field Numeric Keypad - #41 by Transistor](https://forum.inductiveautomation.com/t/perspective-text-field-numeric-keypad/71229/41).

---

<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:** [March 27, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-events/87938/5 "2024-03-27T14:58:16Z")

</div>

The suggestion I linked was actually not the "answer" I thought it was - I've answered this question or a similar way of asking it to many times to count here on the forums.

I don't see an onInstanceClicked Event for the Flex Repeater, and I should amend that post.

For the Flex Repeater, you're most likely going to need to have the instanced View "broadcast" that is has been clicked by placing an onClick Event on the `root` node of the View. That onClick Event should invoke `system.perspective.sendMessage` with a scope of "page". The Flex Repeater should have a configured Message Handler tied to the same message type as the sendMessage function you will be invoking in the instanced View.

```auto
# onClick Event in View
system.perspective.sendMessage("VIEW_CLICKED", payload={"index": self.view.params.index, "someOtherValue": self.view.params.someOtherValue}, scope="page")

```

```auto
# message handler on Flex Repeater
system.perspective.print(payload["someOtherValue"])

```
