# Can a Flex repeater have the number of instances shown be tied to a parameter?

**URL:** <https://forum.inductiveautomation.com/t/can-a-flex-repeater-have-the-number-of-instances-shown-be-tied-to-a-parameter/108187>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 7, 2025, 5:23pm UTC](https://forum.inductiveautomation.com/t/can-a-flex-repeater-have-the-number-of-instances-shown-be-tied-to-a-parameter/108187 "2025-07-07T17:23:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [July 7, 2025, 5:23pm UTC](https://forum.inductiveautomation.com/t/can-a-flex-repeater-have-the-number-of-instances-shown-be-tied-to-a-parameter/108187/1 "2025-07-07T17:23:09Z")

</div>

Building a 'template' that can support up to 20 pieces of identical equipment. These are displayed using a Flex Repeater which works with all 20 objects and each of the parameters are set up in the instances.

In reality each site has a different number of installed pieces. One site may have 12, the next 7, etc. Is there a way to bind the number of instances shown to a parameter? At the moment I defined all 20 instances and then simply delete the unused ones on each individual site however I'm wondering if there is a better way to do this.

Ideally either the option to add a visibility prop inside each instance or an overall prop that would be 'max number of visible instances'.

I'm sure there's an option to script writing into the instance array but I'm trying to balance keeping this user friendly for handover in terms of long term usability.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [July 7, 2025, 5:44pm UTC](https://forum.inductiveautomation.com/t/can-a-flex-repeater-have-the-number-of-instances-shown-be-tied-to-a-parameter/108187/2 "2025-07-07T17:44:38Z")

</div>

Just build this list dynamically based on the number of instances you need via script. That's the common way flex repeaters are used, and is, in my opinion, more maintainable than 20 visibility bindings in an array.

The script is simply a few lines.

> [@Dynamic Flex Repeater Instances](https://forum.inductiveautomation.com/t/dynamic-flex-repeater-instances/30472):
>
> I am trying to get use to this Perspective module and some of the things are giving me some headaches. I have a view setup with three labels that is supposed to be my template. I have a Flex Repeater that is set to use said view as it’s path. I can manually set 1 or 2 or more instances of my template view, but this is not what I want. I am trying to use a tag with a script transform to tell props.instances how many template views and what values to produce. The problem is I get the error: array…

> [@Dynamic Flex Repeater - dataset binding with instances](https://forum.inductiveautomation.com/t/dynamic-flex-repeater-dataset-binding-with-instances/37930):
>
> Hi there I am trying to bind a dataset to a flex repeater instances. I have the same problem as first I got Object found Array expected error so I put in the script [image] and now I got the array found and object not found. I am not familiar with this perspective and would appreciate if someone can show me how I can fix this? Thanks

---

<div class="post-metadata">

**Author:** ![Nol](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Nol](https://forum.inductiveautomation.com/u/Nol)\
**Post date:** [July 7, 2025, 7:31pm UTC](https://forum.inductiveautomation.com/t/can-a-flex-repeater-have-the-number-of-instances-shown-be-tied-to-a-parameter/108187/3 "2025-07-07T19:31:07Z")

</div>

Thanks for that, seems I should revisit how I'm building them from the beginning then.

---

<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:** [July 9, 2025, 1:58pm UTC](https://forum.inductiveautomation.com/t/can-a-flex-repeater-have-the-number-of-instances-shown-be-tied-to-a-parameter/108187/4 "2025-07-09T13:58:04Z")

</div>

> [@ryan.white](#):
>
> more maintainable than 20 visibility bindings in an array.

And probably more performant too, as less things in the dom
