# Access Instance parameter in Flex Repeater

**URL:** <https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 21, 2022, 7:59am UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510 "2022-10-21T07:59:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satchit\_Satonkar](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Satchit\_Satonkar](https://forum.inductiveautomation.com/u/Satchit_Satonkar)\
**Post date:** [October 21, 2022, 7:59am UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510/1 "2022-10-21T07:59:33Z")

</div>

Hi,

I am trying to make parameter path in Flex Repeater dynamic but not getting required results,  
e.g.  
`result_val = self.parent.parent.parent.parent.getChild("MainContents_FlexContainer").getChild("CoordinateContainer_Chem_Results").getChild("FlexRepeater").props.instances[i].sample_1`

for above mentioned path I want to convert sample\_1 dynamic as sample\_str(j)  
`sample = "sample_"+str(j+1)`

When I convert whole path to string its giving me parse error for string to number.  
As its unable to read the value from defined path.

Is there any way we can get thode value by putting dynamic parameter in path.

Thanks in advance.

---

<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:** [October 21, 2022, 8:37am UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510/2 "2022-10-21T08:37:38Z")

</div>

Welcome to the site. Please use the \</\> code formatting button when posting code. It will indent properly (important for Python) and give syntax highlighting. You can use the 🖉 edit link to fix your post.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 21, 2022, 12:53pm UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510/3 "2022-10-21T12:53:05Z")

</div>

replace:

```auto
...props.instances[i].sample_1

```

with:

```auto
...props.instances[i]["sample_"+str(j+1)]

```

But you probably first want to fetch all instances and then loop over it.

```auto
allInstances = self.parent.parent.parent.parent.getChild("MainContents_FlexContainer").getChild("CoordinateContainer_Chem_Results").getChild("FlexRepeater").props.instances
samples=[]
for i, instance in enumerate(allInstances):
  samples.append(instance["sample_"+str(i+1)])

```

---

<div class="post-metadata">

**Author:** ![Satchit\_Satonkar](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Satchit\_Satonkar](https://forum.inductiveautomation.com/u/Satchit_Satonkar)\
**Post date:** [November 1, 2022, 5:02am UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510/4 "2022-11-01T05:02:48Z")

</div>

Thanks for your suggestion.

---

<div class="post-metadata">

**Author:** ![Satchit\_Satonkar](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Satchit\_Satonkar](https://forum.inductiveautomation.com/u/Satchit_Satonkar)\
**Post date:** [November 1, 2022, 5:09am UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510/5 "2022-11-01T05:09:15Z")

</div>

Thank you for your response.  
If we convert it to string, it does not read values assigned to respective path. It gives error as **can not coerce String to Integer**

Still trying to figure out how to resolve this issue.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 2, 2022, 7:33am UTC](https://forum.inductiveautomation.com/t/access-instance-parameter-in-flex-repeater/65510/6 "2022-11-02T07:33:41Z")

</div>

plz post the entire code and which line that gives this error, because this does not look like an error related to the code
