I have 15 embedded data fields filled from five different questions. Some fields could be empty. All I want to do is consolidate the list by removing any empty fields. I'm new to Javascript so my brute force method was to load the embedded data fields into an array. Use the splice method to remove any empty elements, clear the original embedded data fields and then reload them from the array.The purpose of doing this is so that I can simply pipe in the embedded data in order, and there won't be any awkward spaces.I'm getting the syntax error, "Invalid JavaScript! You cannot save until you fix all errors: Unexpected token ILLEGAL" What comma or semicolon have I forgotten?Here's the codeQualtrics.SurveyEngine.addOnReady(function () { let SemiList = [Qualtrics.SurveyEngine.getEmbeddedData('Group1a'), Qualtrics.SurveyEngine.setEmbeddedData('Group1b'), Qualtrics.SurveyEngine.setEmbedd
In the Survey flow, I've set up Group1a, Group1b, & Group1c as embedded data fieldsI created a Pick, Group, & Rank item where the participant is to drag and drop their top three (of six) choices into a single group. All I want to do is save the selected choices to the embedded data fields so I can use them later.I'm really new to Javascript. I wrote the code below, which literally doesn't seem to do anything. I made another item which is multiple choice where I pipe into the options text the embedded data fields. When running through a preview, all three of the multiple choice option texts are blank. Any help would be appreciated.I wrote the following code into the Pick, Group, & Rank itemQualtrics.SurveyEngine.addOnUnload(function(){ /*Place your JavaScript here to run when the page is unloaded*/ let choicesall = this.getSelectedChoices(); let choicesarray = choicesall.split(","); Qualtrics.SurveyEngine.setEmbeddedData
Already have an account? Login
Enter your username or 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.