I have two mutiple choice questions (Yes/No) that shows in a same page. Based in if they are rated yes or not I created a embbeded variable that get a specific value. Then I want to use this embedded data to pipe in a next question. I can do this with a hidden question, but I want to create the embedded data in the same page that are the questions and then use this embedded data in the following page. Unfortunatenly, this is not working. So far, this is my code based in other posts that I read:
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var ans="";
var qid111 = jQuery("#QID111 .InputText").val();
var qid110 = jQuery("#QID110 .InputText").val();
if (qid110 == "Yes" && qid111 == "No") {
ans = "low interest";
} else if (qid110 == "No" && qid111 == "Yes") {
ans = "low mood";
} else if (qid110 == "Yes" && qid111 == "Yes") {
ans = "low mood and low interest";
}
Qualtrics.SurveyEngine.setEmbeddedData("affect", ans);
});
Note that this code is in the same page that questions QID110 and QID111. I want to pipe “affect” embeded data in the next page (or question QID112) lke this:
You said that you feel with ${e://Field/affect} ...