Hi @KendraR, this solved my issue – thanks a bunch!
I got it to work with the following code – it's messy, but it seems to do the job for now. Qualtrics.SurveyEngine.addOnload(function() { /* define the empty embedded data variable TEXT at the beginning of survey flow & calculate recoded_choices embedded data from survey answers*/ var textoptions = ['<br>blood results text <br>', '<br>urine result text <br>','<br>glucose results text<br>', '<br>natrium results text<b>'] /*this establishes the results vector*/ var index = "${e://Field/recoded_choices}"; /*pipe in emb. data var., with choices recoded sequentially to match index, starting with 0 */ var result = []; /* loop to subset out matching text for each index selected*/ for(var i=0; i<textoptions.length; i++) { var index_loop = index[i]; result.push(textoptions[index_loop]); } Qualtrics.SurveyEngine.setEmbeddedData('TEXT', result); /*push to Qualtrics*/ });
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.