# Dynamically set number of instances and value in flex repeater perspective

**URL:** <https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012>\
**Category:** Ignition\
**Created:** [August 17, 2021, 3:51pm UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012 "2021-08-17T15:51:45Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Jackson\_Chilberg](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jackson\_Chilberg](https://forum.inductiveautomation.com/u/Jackson_Chilberg)\
**Post date:** [January 29, 2024, 3:22pm UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012/22 "2024-01-29T15:22:43Z")

</div>

Gotcha, I will use the tag path and not the value... what would an indirect binding look like within a script transform? I guess thats the real question here. Im not too sure what you mean by "in the row view"

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 29, 2024, 7:30pm UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012/23 "2024-01-29T19:30:23Z")

</div>

Row view = the view you're displaying in your flex repeater, the view you're displaying the instances props in. This is where the indirect binding should be, not in a script transform (this isn't possible)

---

<div class="post-metadata">

**Author:** ![Jackson\_Chilberg](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jackson\_Chilberg](https://forum.inductiveautomation.com/u/Jackson_Chilberg)\
**Post date:** [January 29, 2024, 8:00pm UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012/24 "2024-01-29T20:00:00Z")

</div>

I thought about doing it that way initially, but i wanted to try and make it dynamic so if the # of Work Areas change, then id be all set.

---

<div class="post-metadata">

**Author:** ![Jackson\_Chilberg](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jackson\_Chilberg](https://forum.inductiveautomation.com/u/Jackson_Chilberg)\
**Post date:** [January 29, 2024, 8:02pm UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012/25 "2024-01-29T20:02:30Z")

</div>

Also i wanted to order the instances shown based on their status, so if take the row view route could i still do this?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 29, 2024, 10:01pm UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012/26 "2024-01-29T22:01:01Z")

</div>

You will _always_ have a view that the flex repeater displays; that's the purpose of this component, to display a number of a particular View based in the flex repeater's props.instances array.  
If you're looking to sort based on the status though, then yes you will need to read the status when you create the instances array, and continually update it

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 30, 2024, 11:42am UTC](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012/27 "2024-01-30T11:42:59Z")

</div>

I did something like that before, by putting a change script on the property, which sent a message to the repeater asking it to re-evaluate its order.

[Previous page](https://forum.inductiveautomation.com/t/dynamically-set-number-of-instances-and-value-in-flex-repeater-perspective/50012.md?page=1)
