Setting Default Choices from Embedded Data in Side by Side | XM Community
Skip to main content

Hello,
I am trying to set default choices in a side by side question using embedded data set from a contact list.
I have successfully used the following code to perform this action with a single multiple choice question, but am having difficulty doing so for multiple choice questions within a Side by Side question, as shown in the screenshot.
Qualtrics.SurveyEngine.addOnload(function()
{if("${e://Field/edu}" == "1") this.setChoiceValue(1,true);
 if("${e://Field/edu}" == "2") this.setChoiceValue(2,true);
 if("${e://Field/edu}" == "3") this.setChoiceValue(3,true);
 if("${e://Field/edu}" == "4") this.setChoiceValue(4,true);
});
Screen Shot 2020-09-08 at 5.41.47 PM.png

Any help is greatly appreciated!

Hi,
If you are looking for a code to set a multiple choice question in side by side question, then here is the link.
https://www.qualtrics.com/community/discussion/comment/28083#Comment_28083
If you want to set a default choice in drop down then just update the syntax from above link to below for each row.
//First row - second row choice in drop down
if("${e://Field/Skill1Included}" > 0) {
jQuery('#'+this.questionId).find('tbody tr:eq(0)').find('.SBS3 select option:eq(2)').prop('selected',true)
}



Leave a Reply