Hi: I have a drill down question with two components totaling over 5,000 options. I want to display subsequent questions only if certain options are selected in the prior drill down.
I have tried two approaches, neither of which have worked.
I tried to simply use display logic based on a question, but my drill down question doesn’t appear in the list of usable questions once I’m in display logic.
I tried setting two embedded variables in the survey flow, one for each component of the drill down, as follows:
state=${q://QID8_1/ChoiceGroup/SelectedChoices}
mun=${q://QID8_2/ChoiceGroup/SelectedChoices}
Then, for the relevant subsequent question I used display logic for an embedded variable and entered “state” as well as the scores I wanted to select respondents into viewing the question.
That didn’t work either.
Any ideas?
Page 1 / 1
Hello,
If I understand correctly, by "2 components," you mean "2 Groups" in the Drilldown question. If this is the case, you can resolve your issue using both methods you mentioned: adding Display Logic or using Embedded Variables.
The easier approach would be to use Display Logic. Simply select the subsequent question you want to display after your condition is met. Choose "Question" > "Drilldown Question" and select the combination automatically calculated by Qualtrics. I have personally tried this method, and it works well for me. Below is a screenshot of the logic for your reference:
The only limitation you may encounter is that you cannot display the subsequent question "In-Page" because the Drilldown Question is incompatible with In-Page Display Logic.
Let me know if this helpa.
Thanks for your suggestion. I tried both of the fixes that I mentioned, including using display logic. However, the drill down question does not appear in the list of available questions when using display logic. I assumed that it does not appear because the two groups together yield about 5000 choices and that this is too much for Qualtrics to handle.
I also tried setting embedded variables and drawing on those for display logic. I used the code I posted above. Qualtrics does not seem to recognize these embedded variables.
I recognize that it may sound like I just don’t know how to use Qualtrics, but I have used both methods I mention above before, including in other places in the survey in question.
Any other ideas about how to fix this strange issue?
Hi: Here are screenshots showing what I tried.
The drill down question
The drill down question not appearing in the list for use in display logic
The survey flow where I try to set embedded variables to represent the choice in each group of the drill down.
The attempt to use the embedded variables in display logic.
I think the images may be out of order.
@kengreene,
You can add JS to the drill-down question to set embedded data fields:
Qualtrics.SurveyEngine.addOnPageSubmit(function() { var ed = ["state", "mun"]; jQuery(this.questionContainer).find("select option:selected").each(function(i) { Qualtrics.SurveyEngine.setEmbeddedData(ed[i],this.text); }); });
Hello @kengreene,
As your file contains more than 2000 options, this exceeds the limit permitted in Qualtrics at the moment. Therefore, display logic will not work for you in this case. You could try the JavaScript solution provided by @TomG
@kengreene,
You can add JS to the drill-down question to set embedded data fields:
Qualtrics.SurveyEngine.addOnPageSubmit(function() { var ed = ["state", "mun"]; jQuery(this.questionContainer).find("select option:selected").each(function(i) { Qualtrics.SurveyEngine.setEmbeddedData(ed[i],this.text); }); });
Thank you TomG. I’m new to JS. Should the script you supplied create two embedded variables -- one called “state” and the other called “mun”? I did try running this, as written above, and then using display logic based on the state and mun var names. It didn’t work as hoped. Any more guidance you can give will be much appreciated.
Yes, two embedded data fields. You can use them in display logic on the next page. However, they won’t be saved in response data unless you add them to the survey flow.
It should work unless you are using Simple layout.
Yes, two embedded data fields. You can use them in display logic on the next page. However, they won’t be saved in response data unless you add them to the survey flow.
It should work unless you are using Simple layout.
Aha! My institution recently imposed Simple layout. I have never had reason to understand the functionality of layout options. Is there a workaround for my problem while maintaining the Simple layout?
Yes, two embedded data fields. You can use them in display logic on the next page. However, they won’t be saved in response data unless you add them to the survey flow.
It should work unless you are using Simple layout.
Aha! My institution recently imposed Simple layout. I have never had reason to understand the functionality of layout options. Is there a workaround for my problem while maintaining the Simple layout?
This might not be the best way to do it with Simple layout, but it works.
First, load jQuery in the survey header (edit in source mode):
Qualtrics.SurveyEngine.addOnPageSubmit(function() { var ed = "state", "mun"]; jQuery("#question-"+this.questionId).find("inputprole=combobox]").each(function(i) { Qualtrics.SurveyEngine.setJSEmbeddedData(ed(i],jQuery(this).attr("placeholder")); }); });
The names of the embedded data fields will be __js_state and __js_mun.
Thanks for the help, everyone. I tried all the suggested solutions, but nothing worked. After spending way too much time on it, I called Qualtrics support and found out that there is NO WAY to access responses to drill down questions with more than 2,000 options for later use. That is, you cannot use the drill down answers in Display Logic, you cannot Branch using the answers in survey flow, and you cannot assign the answers as Embedded Data. In short, with more than 2,000 response options -- which frequently occurs with locational data, you can’t do anything but record the answers to the drill down itself.
I’m hoping Qualtrics will expand the functionality of drill down questions as they could be quite useful.
@kengreene,
The JS solution I provided works for me regardless of the number of options. I tested it with US State/Counties (3138 rows). It doesn’t make sense that there would be any limit with this approach; if the drill down is displayed it just reads what is displayed.