I have a custom param on my view that’s an array. I have some buttons where I want to iterate the array and show the values on the screen. I have a label on the screen with an expression showing the value, the problem is that I cant figure out to to make the expression dynamic so I can iterate.
I got it working by changing the expression to now() and then using a script transform to build the path and get the value. Is that the right way or do you prefer something else? Thanks!
Does {view.param.datavalue}[{view.custom.selectedIndex}] or something along that line not work?
You could always build the path to the property using property, something like property(stringFormat("view.params.dataValue[%d]", {view.custom.selectedIndex}))
Unnecessary and expensive, expressions allow dynamic indexes when accessing members in an array. Just make the binding an expression binding of {view.custom.lunch}[{view.custom.index}].