# Perspective Modifying An Instance from Flex Repeater

**URL:** <https://forum.inductiveautomation.com/t/perspective-modifying-an-instance-from-flex-repeater/60664>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [June 12, 2022, 7:47pm UTC](https://forum.inductiveautomation.com/t/perspective-modifying-an-instance-from-flex-repeater/60664 "2022-06-12T19:47:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [June 12, 2022, 7:47pm UTC](https://forum.inductiveautomation.com/t/perspective-modifying-an-instance-from-flex-repeater/60664/1 "2022-06-12T19:47:50Z")

</div>

I’m trying to modify an item in an instance of a flex repeater in script. So I get my array of instances like this:

```auto
alloys = self.getChilde('rptr').props.instances

```

When I attempt to change a value like such:

```auto
for alloy in alloys:
   alloy['item'] = newValue

```

No error is raised but the value is never changed. I noticed that the type for this is PropertyTreeScriptWrapper and not a dict like I would have expected. Is there a way to cast that to a dict or do I need to use that objects interface to change a value. (Seems unnecessarily convoluted).

---

<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:** [June 13, 2022, 6:48am UTC](https://forum.inductiveautomation.com/t/perspective-modifying-an-instance-from-flex-repeater/60664/2 "2022-06-13T06:48:17Z")

</div>

You need the propertyTree to be able to change the value.

You probably also shouldnt change the properties 1 by 1 but all in one swoop, this will be better for performance when you have bindings and such on instances

```auto
	alloys = self.getChilde('rptr').props.instances	
	newAlloys=[]
	for alloy in alloys:
		a = dict(alloy)		
		a['value'] = newValue
		newAlloys.append(a)
		
	self.getChilde('rptr').props.instances = newAlloys

```
