Hello,I have a situation where respondents can select multiple responses to Q1 (a list that could have up to 100 possible options). I then want to narrow the selected list down to 5 random options and assign these 5 responses to some embedded variables, for later use. So that I can make sure these random 5 options are evenly distributed amongst the total sample, I’m utalising the 'Advanced Ramodization' feature to select my 5, but I’m not sure how to then extract the 5 selected options into the relevant embedded variables.My current thinking was to use the following script, but it isn’t working…Qualtrics.SurveyEngine.addOnload(function() { // Retrieve selected options from the advanced randomization var selectedOptions = this.getSelectedChoices(); // Store the selected options in embedded data elements for (var i = 0; i < selectedOptions.length; i++) { var embeddedDataName = 'SelectedOption_' + (i + 1); // Name for embedded data element (e.g., SelectedOption_1, Se
Hello, Hopefully this is a fairly simple query.The background is that I have a question inside a block loop. I want to set up some javascript that will hide select options in that question depending on which particular loop is being shown.In the below example, the block will loop through ‘Category1’, ‘Category2’ & ‘Category3’, and when the ‘Field1’ output of the loop is equal to ‘Category2’, I want to hide options 1 & 3 of this question. I have used the section that hides the options on other scripts, but I am unsure how to adjust it to take the input from the block loop (rather than a normal question). Can anyone shed some light on the right formatting required? Thanks. Qualtrics.SurveyEngine.addOnload(function() {var field1Value = "${e://Field/Field1}";if (field1Value === "Category2") { jQuery("#QID2 input[choiceid='1'], #QID2 input[choiceid='3']").closest("li").hide();} });
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.