# Looping through Perspective Flex Repeater bindings

**URL:** <https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 21, 2021, 11:35pm UTC](https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664 "2021-02-21T23:35:34Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [February 21, 2021, 11:35pm UTC](https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664/1 "2021-02-21T23:35:34Z")

</div>

I’ve got a bunch of dropdown views in a flex repeater. Each option has a db query binding.

 ![Perspective flex repeater dropdowns](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7f533a7f3f4ba98af4631766b46b8117d41cbe1.png)

I want to refresh them on receipt of a message so I’m using this script.

```auto
	for inst in self.props.instances:
		system.perspective.print(inst.caption) # Prints the dropdown label.
		system.perspective.print(inst) # Print the binding object.
		inst.refreshBinding("ddOptions") # Update the dropdown param binding.

```

It prints the label caption and the binding object for the first dropdown view but doesn’t do the rest of them.

What have I missed?

---

<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:** [February 22, 2021, 7:46am UTC](https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664/2 "2021-02-22T07:46:40Z")

</div>

`refreshBinding` is a _Component_-scoped function, not a property-scoped function. So you would use it like so:

```auto
for x in range(len(self.props.instances)):
    self.refreshBinding('props.instances[{0}].ddOptions'.format(x))

```

where `self` is a reference to the component while in a Message Handler.

---

<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:** [February 22, 2021, 8:10am UTC](https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664/3 "2021-02-22T08:10:06Z")

</div>

That works, thanks! I’m not familiar with that syntax so I’ll have to study it.

Was that a quick midnight forum check before you get some sleep? I’m in Ireland so you got my day off to a good start.

---

<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:** [February 22, 2021, 3:53pm UTC](https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664/4 "2021-02-22T15:53:17Z")

</div>

Yes, It was, actually. 🤣

---

<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:** [February 22, 2021, 3:59pm UTC](https://forum.inductiveautomation.com/t/looping-through-perspective-flex-repeater-bindings/43664/5 "2021-02-22T15:59:03Z")

</div>

The syntax boils down to obtaining a Perspective component to act on, and then providing the path of the binding to refresh. If you need to update a binding on a different component, you can do that as well:

```auto
self.getSibling('SiblingTable').refreshBinding('props.data')

```
