Randomization with pairwise combinations of pictures | XM Community
Solved

Randomization with pairwise combinations of pictures

  • 13 November 2018
  • 2 replies
  • 48 views

Badge +3
Hi! We have 40 pictures divided into to groups (A and B ). We would like to randomly combine one picture from group A with one picture from group B until all possible combinations have occurred or until say 10 random "pairs" have occurred. Does anyone have an idea? 🙂
icon

Best answer by TomG 13 November 2018, 15:05

View original

2 replies

Userlevel 7
Badge +27
@mha2604,

1. Create a MC question with your 400 (20x20) combinations as choices (A1B1, A1B2, ... A20B20).
2. Add Advanced Randomization to randomly display 10 of the 400 and check "Evenly Present"
3. Hide the question with JS: `jQuery("#"+this.questionId).hide();`
4. Add a loop & merge block, and loop based off the displayed choices in your MC question with the 400 combinations.
5. Add your image urls for A and B as loop & merge fields 2 and 3.
6. Add your A/B MC question to the loop, pipe in loop & merge fields 2 and 3 as the choices, and randomize.
Hi! Is it possible to prevent the same picture from showing? So that picture A1 only is displayed once, but he picture it's being showed with is random... Likewise picture B1 would only be shown once, until all the pictures have been displayed (but in a random order, and in random pairs).

Thanks in advance

Leave a Reply