Search code examples
javascriptdatabaseembedqualtrics

Qualtrics: How to record which version of dynamic text was displayed to participant?


I am dynamically creating a table describing two hypothetical programs that I want participants to choose from: enter image description here

To accomplish this, I have used java code that pulls from a list of opritons (for example, gender: men, women, trans-men, trans-women):

enter image description here

I use html to display the randomly selected word in the table:

enter image description here

And it successfully fills the table with text to participants. enter image description here

I have added the variables to my survey flow: enter image description here

**However, when I look in the dataset, the columns are empty (i.e., it does not record the version of the randomized word that was displayed to participants!

Any help would be much appreciated**


Solution

  • The random* column in the dataset is empty, because you are not storing anything over there. The setEmbeddedData uses the following format ("Embedded Data Name", "Embedded Data Value"). So instead of creating my_word1 in your survey flow, create the embedded variable word1, because that is what you are storing.

    The values already exists in your database, so you should be able to see these for previous responses also.