Hi, I'm fairly new to Qualtrics (and have zero (0) knowledge about JavaScript) so here I am because I couldn't find an answer :,)
Context:
For my survey, respondents have to read 30+ vignettes. After each vignette, respondents have to answer 3 questions (which are the same for all vignettes). So each vignette + 3 standard qns have to be in a block.
The presentation of the vignette-blocks will be randomised, but respondents must read & respond to all of them.
Problem:
Every vignette contains a fictional person's name. I have a list of fictional names to be presented to respondents, and would like the name displayed in each vignette to be randomised. (e.g., Respondent 1 would see 'Tom' for Vig.1 & 'Harry' for Vig.2; respondent 2 would see 'Harry' for Vig.1 & 'Tom' for Vig.2) Each name can only appear once per respondent.
From my understanding, use of embedded data and piped text are the most efficient ways to achieve this. However, while I have tried many different methods, so far I cannot figure out how to:
(a) display a different name for each vignette -- I tried inserting a Randomiser element, but all the vignettes ended up displaying the one randomly selected name; and
(b) ensure that each fictional name appears only once across all the vignettes.
(c) I was also wondering if it was possible to insert the same name twice in the vignette, something like:
^Hence, the same name would have to be displayed within each vignette.
My priorities are to achieve (a) and (b); (c) is ideal but optional!
Thank you so much in advance :") If the solution requires JS I will learn it.......
Solved
Randomise the embedded data to be shown in piped text across different questions

Best answer by TomG
You need to randomly assign 30 unique names to unique embedded fields and pipe them into your vignettes (i.e., field name1 piped into vignette 1, name2 piped into vignette 2, etc.). One way to do this:
- Sometime before the first vignette, create a MC question with the 30 names as choices
- Randomize the choices
- Add JS to the question to loop through the choices and save the choice labels (i.e., the names) into embedded data fields (name1, name2, etc.)
- Use JS to hide the question
BTW, you could use a loop and merge block to do all the vignettes in one block.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.