Loop and merge with two types of loops. | XM Community
Skip to main content

I'm working with survey in which participants will see a random subset (50 out of 100) items based on specific criteria.In the loop and merge, these 50 (based on displayed choices) have two fields field1 and field 2. Additionally, I have a separate, constant set of 50 items. My goal is to pair these constant items (like a Field 3) with the initially displayed 50 items. However, I cannot add this field 3 as there will be 100 items in the loop and merge but only of the 50 secondary items which can be paired in any way with the selected choices.

An ideal scenario would be if I could loop through in two ways: 1. for the displayed choices (Field 1 and Field 2) and another exclusively for cycling through the constant 50 items. 

I am not sure the best way to approach this please let me know if you have any suggestions/ solutions. 

@SwaroopP - Maybe you can add the 50 constant items to your ‘displayed choices’ question and always display them.


@TomG , You can think of it like a non-displayed field (lets say A for clarity) that has 50 values assigned to the ones that are displayed initially (50 are shown out of 100) (lets say B) (the only criteria is that A must be assigned to any B - these don’t need to be the same/ or random the only criteria is that A should not be repeated while assigning to B. So the A (50 shown) must have a B (any of the 50 non-displayed) in any order/randomness but without repeating any of the B.

The trouble I was having was that if I looped with displayed choices there are still a 100 fields (B) and I am not sure how to assign 50 A to 100 B of them (though when the survey is run, this number is at 50, the loop and merge still has 100 items). Hope that clears up what I am trying to do here. 


@SwaroopP - So the pairing of A and B doesn’t have to be random? If that’s the case, you can make your 50 loops B (field 1). You don’t even need to base the loop on a question. Then you can add 50 A’ as field 2 and 50 A’s as field 3. You can use JS to randomly choose field 2 or field 3 to pair with field 1.


Leave a Reply