I'd like to create an embedded data field
age3which groups an age variable (
answered_age, type Number), but I'm unable to get the field to populate when testing the survey.
age3is initiated as a Text Set variable at the top of the survey flow. I've included the code I've written below.
Qualtrics.SurveyEngine.addOnload(function() {
var age3 = "55+";
if (answered_age > 18 & answered_age <= 34) {age3 = "18-34"};
if (answered_age > 35 & answered_age <= 54) {age3 = "35-54"};
Qualtrics.SurveyEngine.setEmbeddedData("age3", age3);
)}
Can anyone point me in the right direction? I'd appreciate any help on this! Thank you so much!