Piping text from a Loop & Merge field in another block | XM Community
Solved

Piping text from a Loop & Merge field in another block

  • 18 April 2024
  • 1 reply
  • 19 views

Badge +1

Hi everyone! I would like to ask your help for this task. 

 

I have created a block with a multiple choice question and multiple answers asking participants which of following events happened to them in the last 12 months (screenshot below).

After the participants select their events, I would like to ask them some questions for one specific event taken at random from the ones they selected. Therefore, in another block I used the Loop & merge field. 

 

 

Now I’m in a new block, and I would like to use piped text to refer back to the same event, but I’m not allowed to do it because in new blocks I can’t pipe previous Loop & merge fields from previous blocks. I can’t neither create a new Loop & Merge field beacuse this would randomly pick a new item from the list (while I would like to pick the same event as before!). 

 

My question is: how can I pipe the text that I’ve created from a loop & merge in a previous block? Should I use some Embedded data in Javascript? If yes, can you show me how? 

icon

Best answer by TomG 18 April 2024, 20:55

View original

1 reply

Userlevel 7
Badge +27

You can use JS to set an embedded data field in a loop question with the event displayed in the loop:

Qualtrics.SurveyEngine.addOnload(function() {
Qualtrics.SurveyEngine.setEmbeddedData("loopEvent","${lm://Field/1}");
});

 

Leave a Reply