Flex repeater and instances

I have a bit of an issue,

I have a flex repeater, with a query binding. I have a script transform, which has some conditional syntax
depending on the conditions. For example


my issue is for example, if I return test1_instance, it will show the correct number of instances, and vice versa for test2_instance.

but I want to show both in one list

if i do this
return test1_instance,test2_instance

what this does is whatever is first, for example:
test1_instance it will display the correct number instances but the test2_instance it will create the
instance ok but then all the results of that instance become members of that instance, instead of creating an Instance

sorry if this is confusing

return test1_instance,test2_instance is returning a tuple.

You probably want:
return test1_instance + test2_instance

A Flex Repeater displays multiple instances of ONE View. The number of instances is determined by ONE list: FlexRepeater.props.instances. Your code leads me to believe you're trying to use two different lists to store your instances, but you also claim some conditional logic while supplying none.

Try adjusting your logic in the transform to follow a pattern like this:

instances = []
for entry in value:
    instance_obj = {}
    # add some key:value pairs to your object based on the entry
return instances
1 Like

cheers that work. thanks.