Ive made an embedded data in the survey flow, now i want to change its value based on which choice was selected in one of the questions. The choices are (Yes, Maybe, No). i want to change the embedded data value to “text1” if they choose Yes or Maybe and change it to “text2” if they choose No.
This is what i tried so far. Sorry, I am new to java and programming in general
if("${q://QID949/ChoiceGroup/SelectedChoices}" == "Yes" || "Maybe")
{
Qualtrics.SurveyEngine.setEmbeddedData('vinnustadur', "text1")
}
else
{
Qualtrics.SurveyEngine.setEmbeddedData('vinnustadur', "text2")
}