Creating a new empty list from a number

I was building a form yesterday where a builder could set up a multi step file upload based on how many files they wanted to ask a customer for. The puzzle came when I wanted build a repeater based on the variable of that number; I wasn’t sure how to build a list with a variable number of empty objects.

The mighty @joechrz passed this on to me, so I thought I’d share here:

First I bound the number input to a variable called file_uploads. Then I referenced that variable in the data field of the repeater using this expression:

FROM RANGE(1, file_uploads) SELECT { }

And like magic, it was working.

2 Likes