Dynamically populate label values from json object for instances from repeater

I have a flex repeater which is populating a number of instances of different weight values from a db query.
It is repeating a view with a simple label and numeric field component.
I need each label value to consist of the weights from my instances.
How can I dynamically bind this?


So that each label displays the values from each object?
I created a custom property on the root container of my repeater.
I can reference that in my expression binding on my label. But it is hardcoded to select the first element only.

The Flex Repeater takes an Array of values that represent an embedded view and a view can have any number of parameters. Parameters are updated by the value you are providing in the instances property.

From what I see you have a Flex Repeater that is only pushing one param into the instances - "UOM". If you have two weight values I would expect the parameter payload for the instances to be: [{"numeric": "300.00","simple": "300 g"}, {}, {}, etc] so the query would select 2 values.

You may need to clarify your use-case, you mentioned that you created a custom prop on "the root container of my repeater" but the screenshot shows a reference to a custom prop on the embedded view (not the repeater).

These videos are missing some of the QOL features in newer Perspective versions but this one and the lesson after it highlight a multi-param view/repeater: Creating the Data Card View Video at Inductive University

1 Like