How do you get the embedded data of a static loop and merge field? | XM Community
Skip to main content

I am having some issues getting data out of a randomized static loop and merge field.
For example, in question 1, I pipe in the following for choice 1...
Choice 1:

And I pipe in the following for choice 2...
Choice 2:

However, when I download the CSV output for the survey, I'm unable to see each respondent's options. Is there a Javascript that will allow me to view my respondents' options?

When downloading the data, check "Use numeric values", you will be able to see the option recode value selected by respondent.


How do you get the embedded data of a static loop and merge field?I'm interested in getting the content that the respondent sees. If I do a loop and merge and the respondent gets a random character from the field, I want to be able to see what the respondent got.


From the code written in the question, it is clear that the choice 1 will always be data present in field 1, which I guess is fixed. So you can backtrack and check if option 1 is selected then resource is field 1 resource.


How do you get the embedded data of a static loop and merge field?I apologize, I must be asking the question poorly.
Say in the backend, the question is, "What are some good qualities about the ${lm://Field/1}?" Field/1 is set to show Samsung, iPhone, or Blackberry randomly.
In the frontend, the respondent sees, "What are some good qualities about the iPhone?"
I want to be able to output the responses as a CSV file and see which respondents got Samsung, iPhone, or Blackberry.
I understand some javascript is required, but I haven't found an effective way to do this. Any help would be much appreciated!


I don't think that once the data is collected anything can be done with data using JS, the only possible way is to back track the logic i.e. how the field 1 value is set.
For this type of surveys in future, it will be good if we could have captured the field 1 in an embedded data run time.
How are you setting this the field1 randomly?


You can do this using JS, just add span with number assigned to the brands for example, Brand 1, Brand 2
The piping syntax ${lm://Field/1} will pipe span as well as brand name.
Now just add one embedded variable in survey flow and using JS you can set the displayed number.
var currbrand = jQuery('.ord').html();
Qualtrics.SurveyEngine.setEmbeddedData("q1_brand_order",currbrand)


Leave a Reply