Solved
Pre-select multiple choice options based on embedded data
I would like our community partners to review the current information we have stored and make any needed changes. One of the questions is the type of partnership they have with us -- ranges from a level 1 - Job Fair to level 6 - Career Internship. I have embedded data "Level Number" which is one or more values based on their answer earlier this school year (ie Level Number 1,2,5,6). I am trying to pre-check the same levels when I display the data to them for their review. Searching through the community I have found some javascript code but it does not seem to be selecting any of the responses for me. I would appreciate any tips in the coding
Qualtrics.SurveyEngine.addOnload(function()
{
var val ="${e://Field/Level Number}".split(", ");
for (var i = 0; i < val.length; i++) {
this.setChoiceValueByRecodeValue(val[i],true);
}
});
Best answer by MichelleM
I found I was able to get my code to work, as long as the attribute was coded Level Number 1, 2, 5, 6 rather than Level Number 1,2,5,6 (needs the spaces after the comma).
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.