Hello,
I'm currently working on a survey where respondents will see 5 of 10 possible questions (1-10) in a random order. Based on the questions that respondents saw and the random order in which they saw those first 5 questions, I want to present 5 more questions that are paired with each of the 5 original questions.
--
Example:
Question 1 is paired with Question A, 2 with B, 3 with C, 4 with D, 5 with E
If Questions 1-5 appear in the order, 1/2/4/3/5, how do I ensure that Questions A-E appear in the order, A/B/D/C/E?
--
The random order will also vary across respondents. Please let me know if you'd like more detail or a sample survey and I'll get back to you.
--
Update:
I went with a variation of ahmedA's solution. It doesn't use regex, and uses more embedded data than they suggested. I also have no idea if ahmedA's solution works even though Qualtrics flagged it as accepted: presumably it does work, but I couldn't track down the relevant posts to fully implement their solution.
1) Make a Embedded Data (ED) field, "Test_Value", and set it to 0. This is the first object in the survey flow.
2) Within a randomizer (evenly present ALL elements), make 3 groups.
3) Within the first group, start with an ED field that increments Test_Value by 1. To do this, set the value of Test_Value to $e{ e://Field/Test_Value + 1 }.
4) Within the first group, show Block 1, which will only contain Question 1.
5) Add a branch within the first group for each possible value Test_Value could take.
6) Each of those branches should have its own ED. For the first branch, this ED can be "First", "Second" for the second, etc. The ED should be the only object under each branch.
7) Set First = A, Second = A, etc. within the first group in their respective branches.
8) Repeat steps 3-7 based on the number of initial questions you want to randomize. Per the example, this would mean 5 groups (Questions 1-5), but I'm going with 3 in the example because it's easier to check your work.
9) Make 3 more groups, called "First Conditional", "Second Conditional", and "Third Conditional." Below steps are for "First Conditional" but generalize to "Second" and "Third".
10) Within the group, add three branches. The branches should be subsets of the group, NOT of each other.
11) Each branch will set a different ED field equal to the relevant question. For example, in the group "First Conditional", the branches have the conditions "if First = A", "if Second = A", and "if Third = A".
12) Put the relevant question from questions A-E in each branch. For the group "First Conditional" and the branch "if First = A", that would be question A. If it's the branch "if First = B", that would be question B, etc.
13) Repeat steps 10-12 for "Second Conditional" and "Third Conditional."
If you don't know any Java (like me) or couldn't find the relevant forum posts to do this more efficiently, this should work.
Best answer by ahmedA
View original