Use question choice to set embedded data | XM Community
Skip to main content
Hello everyone,

I need a code to set EmbeddedData on basis of the selected choice. This is where I want to go:



Qualtrics.SurveyEngine.addOnPageSubmit(function() {

var choice = parseInt(this.getSelectedChoices());

var status = ["now", "still"];

if (choice = 1){

status = "still";

} else {

status = "now";

}

Qualtrics.SurveyEngine.setEmbeddedData("Status", status);



I have a very complicated survey flow and cannot use branch and bound or display to incorporate the logic.

Best
var choice = parseInt(this.getSelectedChoices());

var status = ["now", "still"];

if (choice = 1){

status = "still";

} else {

status = "now";

}

Qualtrics.SurveyEngine.setEmbeddedData("Status", status);



I still have not found a solution to this. Can anyone help me?

Thank you so much
I don't know how to do this outside of putting in embedded data in the survey flow just after the block in question.

Leave a Reply