Solved
Make matrix statements dependent on prior selection
I have a list of managers and the employees that work under them, and I’m trying to set up my survey so that:
• On page 1, managers will select their own name from a dropdown list
• On page 2, there will be a matrix question where the “statements” will be a list of that specific manager’s employees’ names, so that the manager will have to give a response to the same question for each of their employees all on the same page
I currently have all of this info (employee name and the name of the manager they work for) in a spreadsheet, but there’s 100 managers in the study so I’m trying to avoid having to create 100 separate questions and just using simple display logic if possible. Any help would be greatly appreciated!
Best answer by TomG
An alternative that I think will be easier to implement because you won't have to add display logic for every single employee...
Arrange a copy of your spreadsheet data so that you have one row per manager with the managers in the same order as your drop-down question. Put the manager name in the first column followed by a column for each of their employees. You'll have as many columns as the maximum number of employees per manager + 1 (for the manager).
Put your employee matrix question inside a block by itself and make it a loop & merge block based on the selected answer in your manager drop down (it will only loop once). Highlight and copy all the employees in your spreadsheet (starting at the top of column 2), and paste them into the cell immediately under Field2 in your loop & merge setup.
Pipe the loop & merge fields as the rows of your matrix...${lm://Field/2}, ${lm://Field/3}, etc. up to the maximum number of employees per manager. Add display logic to each row to display only if the loop & merge field is not empty.
You should add employee1, employee2, etc. embedded data fields up to the max number of employees per manager in your survey flow. Then update the embedded data fields in a JavaScript attached to your matrix question with the loop & merge fields.
```
Qualtrics.SurveyEngine.setEmbeddedData("employee1", "${lm://Field/2}");
Qualtrics.SurveyEngine.setEmbeddedData("employee2", "${lm://Field/3}");
etc.
```
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
