Any suggestions on how to create a possible combination of 50 questions? | XM Community
Question

Any suggestions on how to create a possible combination of 50 questions?

  • 30 June 2020
  • 1 reply
  • 10 views

Badge

I'm trying to design a survey that includes the following 3 questions, each becoming more granular before the previous question and containing choices dependent on the previous questions:

  1. What building do you work at?

  2. What area do you work at?

  3. What specific location do you work at?


There are 5 possible choices to question 1: UB, UD, UH, UL, UO
There are 10 possible choices to question 2: Classrooms, Hallways/Pods, Cafeteria, Common Spaces, Copy Room/Staff Office, Main Office, Supply Room, Adult Restroom, Student Restroom, Gym
There's no display logic needed for question 2, since all choices from question 1 allow all choices for question 2.

Now for the fun part, question 3, which has a bunch of possible choices since they depend on the answers to questions 1 and 2.
Ex: if someone choose UB and Classrooms, they should have 33 possible choices. If they were to choose UH and Classrooms, they should have 48 different choices.
I've been able to think of 2 possible solutions for the last question:
  1. Create a total of 50 (5x10) questions, each containing the specific options for each Q1+Q2 answer combination, and create display logic at the question level based on responses to the first two questions.

  2. Create just 10 questions, each for the options from the second level containing all the possible answers. Set the display logic at the answer choice level. This seems more tedious since I would have to click into each answer choice and set the logic manually for a bunch of answer choices.

Are there any other options?
Looking for something that wouldn't require too much time to design while also keeping it visually okay for a person to experience as a survey-taker.


1 reply

Userlevel 5
Badge +4

You can create on hidden question and add all the possible choices at that question and using JS you can punch the respected choices.
For example, if someone choose UB and Classrooms, they should have 33 possible choices, so in this case you can simply punch the 33 choices in that hidden question, use the below code to punch the 33 choices based on the selection of Q1 and Q2.
Qualtrics.SurveyEngine.addOnReady(function()
{
var q1val = "${q://QID1/SelectedChoicesRecode}"
var q2val = "${q://QID2/SelectedChoicesRecode}"


// 33 possible choices recode values
var arr1 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]
if(Number(q1val) == 1 && Number(q2val) == 1)
{
for(var i=0;i{
this.setChoiceValueByRecodeValue(arr1[i],true)
}
}


if ("${e://Field/Q_CHL}" != "preview"){
jQuery('.QuestionOuter').css('visibility','hidden')
jQuery("#NextButton").click()
}


});
Make sure to match the recode values of choices and the respected array, in the above example the recode value of possible 33 choices should match with arr1.
Similarly you can create the array of your possible choices based on the selection of Q1 and Q2.
Once done, you can carry forward the selected choices at Q3, so in this way you will have to create just one extra hidden question (hQ3 - Multiple choice).

Leave a Reply