Hi there,
I already asked before but still didnt manage to get a great result. TI am trying to test if the Answers of QID171 (multi choice respons) can be saved seperated in email1, email2, email3. This is the script Im trying to let it work but I have no idea why its not working.
Qualtrics.SurveyEngine.addOnload(function() {
// Replace 'QID171' with the actual question ID var questionId = 'QID171';
// Get the selected choices from the multi-choice question
var selectedChoices = Qualtrics.SurveyEngine.getSelectedChoices(questionId);
// Set each selected option in separate embedded data fields for
(var i = 0; i < selectedChoices.length; i++) { var embeddedDataName = 'email' + (i + 1); var selectedChoiceText = jQuery("#" + questionId + " label[qid='" + selectedChoices[i] + "']").text().trim();
Qualtrics.SurveyEngine.setEmbeddedData(embeddedDataName, selectedChoiceText); } });
A loop like this should be great but Im also willing to just write it down for 5 email embedded data. The problem is that I can't get the answers splitted or maybe dont know how.