Flex Repeater Script Instance Additions

Here’s what I ended up doing to programatically add instances; I run this in a message handler on my FlexRepeaters.

# Check if the instances list is empty.
# If the instances list is empty, create a new list. Otherwise, load the current list.
if (self.props.instances == None):
	currentInstances = []
else:
	currentInstances = self.props.instances.tolist()
		
newInstance = {
	# Put your instance properties here.
	}
	
currentInstances.append(newInstance)
	
self.props.instances = currentInstances
3 Likes