randomising options within a question | XM Community
Skip to main content

Dear all,

I have a set of questions in a questionnaire. I am showing one of them as an example:

Please, choose the products you usually purchase during your weekly grocery shopping.

  • Fruit juice £1.2
  • Fruit juice £1.8
  • Fruit juice £2.4
  • Coffee £2.0
  • Coffee £2.4
  • Coffee £2.8
  • Squash £5.0
  • Squash £7.5
  • Squash £10.0
  • I don’t purchase any of the foods

I want that the program, randomly, picks one option within Fruit juice, one option within Coffee and one option within Squash. I have tried several ways with qualtrics actual options but I am not resolving it.

 

On the other side, with java script can be the solution but my skills are almost absent with the program.

 

I will be very grateful to anyone who responds.

 

Thanks a lot for your time!

 

You can simply create three randomizer before the question. one for coffee, one for Squash and one for Fruit juice. As per below screenshots. 

 

 

Then you can apply display logic on each option.

Question is:
 

 

 

No display logic on none. you will get all different 84 combination.

Output will look like:

1

2

 

3

 

If I’m understanding it correctly, you are looking for same solution. In which no need of java script.


Dear Arun,

 

Thanks a lot for your suggestion and the effort. Unfortunately, I have a very complex questionnaire which already has a very high number of embedded data. Therefore, I am trying to reduce the number of embdded data that I create as much as I can. Do you have any idea about other type of solutions, without using javascript? Thanks again :)


Dear Arun,

 

Thanks a lot for your suggestion and the effort. Unfortunately, I have a very complex questionnaire which already has a very high number of embedded data. Therefore, I am trying to reduce the number of embdded data that I create as much as I can. Do you have any idea about other type of solutions, without using javascript? Thanks again :)

Hi @Vi86 , Embedded fields will not impact on your survey you can use as much as you can. other way is using hidden questions. that option is much worse than embedded field. I would suggest you to avoid less questions and more embedded fields instead. another way is that you can use web service and can use json with get and post method to pull and push the information from your survey to database then pick 1 random value from each grocery group and store it back in survey embedded field (still embedded fields will require). But that is more time taking, lengthy process and can slow your project if database service will down. Always prefer those solution which are available within tool. at the end choice is yours. Thanks!!


Thanks a lot! :)


@Vi86 - You can reduce the number of embedded fields and survey flow complexity by using one field for each category (e.g., coffee). Instead of using randomizers set the value of fields to a random number from 1 to 3. Then base display logic off those values. The one drawback is you can’t force an even distribution.


Leave a Reply