hi fleb, thanks so much for helping out! I tested the code but there are some problems I cannot fix. Here is the javascript i used: Qualtrics.SurveyEngine.addOnload(function() { var codeList = "${e://Field/codeList}"; //Gets your code list var code = "${q://QID1/ChoiceTextEntryValue}"; //Gets your code codeList = codeList.split(","); //Your code list was one string; this split it to elements var included = codeList.includes(code); //Returns true if the code is in the code list or noting Qualtrics.SurveyEngine.setEmbeddedData( "included", included ); //Send "included" to an embedded field of the same name }); I defined codeList and included as embedded data as the first step. but it seems the value of "included" is empty if I do it this way: ! if I define the codeList and included after the default block, the returned value for "included" is always true (I get this by downloading the data). Would you be able to tell me what I am doing wrong
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.