I am building test questions that need to be randomized. In the photo, these questions are populating into a repeating group from a CSV I uploaded. I am wondering if it is possible to randomize the numbers in the questions.
I wrote all of the initial questions as excel formulas, where the names and numbers are randomized, but the question remains the same. I cannot figure out how to do this in Bubble. Any advice is appreciated!
Hi there, @anniecw… as with all things Bubble, I’m sure there are a number of ways to do what you described, and one of those ways (I have a working example) could use option sets and placeholders in the questions.
First, I created three option sets that look like this.
Finally, in the text element in the repeating group, I strung together three :find & replace operators to find each of the placeholders and replace them with a random item from the appropriate option set. The find and replace for name looks like this.
In the Replace by field, you select the Get an option operator in order to build out the expression I am showing.
The second find and replace replaces the {number1} placeholder with a random option from the OS Question Numbers1 option set, and the third find and replace replaces the {number2} placeholder with a random option from the OS Question Numbers2 option set. Note that all of the numbers in the second option set are less than the numbers in the first option set so you don’t get a negative result in any of the subtraction questions.
Anyway, that’s one way you could go here, and I hope it helps.
Best…
Mike
P.S. Someone really should talk to Ying about all the oranges she is eating… that can’t be good for her.
Mike, THANK YOU! It worked perfectly. I appreciate the detailed reply. And yes - too many oranges for Ying. You can see why I need to generate more numbers!