Loop and merge randomise loop order between 2 fields | XM Community
Skip to main content
Question

Loop and merge randomise loop order between 2 fields


Forum|alt.badge.img+2

Hi! I have a question about loop and merge, and could not find any answers on the forum. I want to randomise the loop order not only between the rows, but also the columns of my loop and merge. I am displaying my images side by side in my question block, as can be seen in the second image. For that to work, I need two fields. I want to randomise the pairing of the images for my experiment. Does anyone maybe have any suggestions for me? I would greatly appreciate it!

 

 

2 replies

Forum|alt.badge.img+11
  • QPN Level 5 ●●●●●
  • 78 replies
  • June 29, 2023
COfferman wrote:

Hi! I have a question about loop and merge, and could not find any answers on the forum. I want to randomise the loop order not only between the rows, but also the columns of my loop and merge. I am displaying my images side by side in my question block, as can be seen in the second image. For that to work, I need two fields. I want to randomise the pairing of the images for my experiment. Does anyone maybe have any suggestions for me? I would greatly appreciate it!

 

 

There is no direct way to do this. Could be done using JavaScript not sure though. This thread also speaks about the same issue


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5940 replies
  • June 29, 2023

Randomly assign the field 2 images to embedded data fields prior to the loop (e.g., loop1img, loop2img, etc.), then pipe those values into field 2 (e.g., ${e://Field/loop1img}). You can do the randomization with survey flow randomizers, but as easier solution it to make them choices in a randomized MC question and use JS to hide the question and save the choice labels (the image urls) to the embedded data fields.


Leave a Reply