I’m hoping for help with accessing the data from a MaxDiff question via JavaScript.
For context, I am trying to create a MaxDiff survey with conditional follow-up questions. So if someone selects feature X during any of the MaxDiff questions as most preferred, then at the end of the survey they see the "feature X follow-up question." If they did NOT select feature X as most preferred, then they do NOT see that follow-up.
I see that MaxDiff questions do not work with survey logic. So I am trying to get it to work with JavaScript.
From an export of the data, I found the variable names associated with the MaxDiff selections:
QID1_1
QID1_2
QID1_3
…
Which then correspond with the order of concepts in the following variables:
1.1_MAXDIFF
1.2_MAXDIFF
1.3_MAXDIFF
…
But I can’t figure out how to access the value in JavaScript.
When I return a console.log of the following MaxDiff variables, it returns nothing:
temp_MaxD_Question = '${q://QID1_1}';
console.log("temp_MaxD_Question = " + temp_MaxD_Question);
With a multiple choice question, I know to append “/ChoiceGroup/SelectedChoices” which when returning in as console.log, returns the value of what was selected:
temp_MC_Question = '${q://QID7/ChoiceGroup/SelectedChoices}';
console.log("temp_MC_Question = " + temp_MC_Question);
Does someone you show me how to access the value of the variables like QID1_1 and 1.1_MAXDIFF?
I found the post below, but it only suggestions JavaScript as a solution. It does not describe how to do it.
Thanks a ton!