How to random sort choices in a question

1719
7
10-02-2018 04:54 PM
SuzanneAgan1
New Contributor

I am creating a survey in which I need the multiple choice answers randomized. In other words they change order randomly for each person filling out the survey. Is there a way to do this? 

Also to choose one out of a set of three questions to appear on each survey. It is basically the same question shown 3 different ways to see how people respond differently. 

Any help?

Tags (1)
0 Kudos
7 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Suzanne,

Survey123 does not support randomization of choices or questions at this time.

0 Kudos
NickDierks1
Occasional Contributor II

There's actually a way to make this possible, but it involves a lot of setup, and gets exponentially unreasonable with the more choices you have per question. If your survey is relatively short, and your questions ideally have only three possible answers each, then this is likely doable. It all depends on how much work you want to put in to randomize the choices.

First, figure out how many permutations there are for your choices. If your questions each have three possible choices (abc), then you have 6 possible permutations (abc, acb, bac, bca, cba, cab). If you have four possible choices (abcd), then you jump up to 24 possible permutations. For each question you want to randomize the choices for, include a different choice list for each of the possible permutations. You'll then include in your form a different variation of each question (each pointing to one of the different choice lists).

Then (again, for each question) you can use a calculation with the random() function to generate a random number. Each of your question variants will have a relevant clause set up for one of the possible random numbers generated. Finally, a hidden field for each question will use a nested if/then calculation to collect the response from whichever variant was answered. Don't forget to mark all the question variants as null! This way, your schema will only include one field for each question.

Setting up an array of random questions is pretty similar. Again, use the random() function to generate a random number, and use relevant clauses to have one out of X questions randomly appear. Since you're asking for a single questions asked three different ways, you can again collate these questions into a hidden field so that users' responses are spread out between multiple fields in the schema.

I've attached an example form that shows this in action. It includes one question with randomized answers (four choices, so 24 permutations), and one randomized question.

0 Kudos
JodyZhengLiu
Esri Contributor

Hi @Suzanne Agan and Nick Dierks‌,

The randomized choices option is available now on https://survey123beta.arcgis.com,along with other new beta features for the next release. We would love to have you to test it out and share any feedback or issues you may encounter in the Survey123 Beta Website Feedback forum.

Thanks a lot,

Jody Zheng Liu

0 Kudos
DougBrowning
MVP Esteemed Contributor

Does this mean on the fly sorting is coming?  We would like that last choice picked to go to the top on each repeat.

thanks

0 Kudos
JodyZhengLiu
Esri Contributor

Hi Doug Browning‌,

This is currently not on the product plan, but I have logged an enhancement for it. I encourage you to submit an enhancement request via Esri Support. Our Support team will assign an official enhancement number for your records. Similar requests from other customers can then be attached to the same enhancement request, which helps us assess demand for the enhancement and prioritize it accordingly.

Thanks,

Jody Zheng Liu

0 Kudos
DougBrowning
MVP Esteemed Contributor

I talked to Ismael and Phil and they said it is on the list months ago.  At least I really hope so.

thanks

0 Kudos
JoanLouie1
New Contributor II

The XLSForms website indicates a Randomize Choices functionality: XLSForm Docs via the Parameters field, randomize=true

is this totally different from the beta feature for Survey123?

0 Kudos