Having Survey123 Randomly Select Questions from a Pool

297
2
01-23-2024 07:31 AM
BrianTruong
New Contributor II

Hey All, 

Need some help seeing if something like this is possible on Survey123. Looking to see if I could see 3 random questions from a pool of 15 questions each time I open up survey123. 

 

So if anyone has any ideas or suggestions it would be greatly appreciated.

 

Thank you!

2 Replies
DougBrowning
MVP Esteemed Contributor
0 Kudos
IsmaelChivite
Esri Notable Contributor

One more suggestion in the attached Random12.xlsx

The random function in XLSForm generates random numbers. For example: int(12*random())+1 will generate a number between 1 and 12 (included). You can then use that number to show/hide questions.

With the logic in the attached XLSForm, there is a small chance you could potentially get fewer than 3 questions if random picks the same number twice. I added a simple check, but it is not bullet proof.

0 Kudos