 # Random quiz with random answers

This is a follow up to a post I made some time ago. First of all, my statements are guesses, I’m far from understanding everything that can be done with Bubble.
I’m trying to do the following: Show up random questions with a random answer being the correct one.
Thing is, I need these random answers to be randomly localized too. For instance, the question is followed by three texts in a row. One of them is true, all the others are false.

In order to make let’s say 3 random questions appear, I use a repeating group with a text field that shows up random questions from a database. Then problems arise.
If I use that group to make 3 random answers appear, I don’t know how can I do to force the correct one to appear in one slot (if possible). Very likely this can’t be done, as repeating groups can’t repeat horizontally. Even if they did, it wouldn’t solve the problem of “the correct answer” forcibly appearing.

I can however make one of the three answer’s columns show up the correct answer, but then the correct answer would always be in the same column.

And even if I could manage to work this out, some fake answers would make no sense at all to some questions.

An example just to clarify further:

3 questions in a database:

• What is the speed of sound?
• What is a banana?
• What is Italy’s capital city?

455 km/h
479 kg
8563 y/s
Red
Orange
Paris
The moon

341 m/s
Yellow
Rome

What can happen:

• What is the speed of sound? RED 455 KM/H THE MOON

Or

• What is the speed of sound? RED 341 M/S THE MOON
(and the rest of the questions always have the correct answer in the 2nd column)

Of course these are stupid examples. Questions/answers wouldn’t be that random, so fake answers would make sense between questions, more or less.

Guess there is no way to do this?

Have you tried applying the random sorting function?

It can be a bit tricky to find at first. Though as long as your database structure makes sense, then you should be fine using the random sorting function to achieve your goal.

1 Like

Thanks dan1, I chose a different, non-random approach for the time being. But whenever I have more time I will try it though

This topic was automatically closed after 70 days. New replies are no longer allowed.