Best way to randomize and selectively display blocks? | XM Community
Solved

Best way to randomize and selectively display blocks?

  • 30 October 2019
  • 3 replies
  • 24 views

Userlevel 5
Badge +15
  • Level 4 ●●●●
  • 218 replies
I just administered a survey and am wondering if there was a more elegant way for me to design it. I had six blocks that needed to be selectively displayed to respondents based on embedded data (i.e., if Block_1 is not empty, display Block 1). This would be easy to do using branching. But, I also needed to randomize the order that the blocks displayed. That can be done with a randomizer, but I couldn't see clearly how that would play well with branching. My solution was to use a randomizer for the blocks, and then set the display logic for all the individual questions in the blocks based on the embedded data. It worked, but it was a little tedious to set up. Are there other recommendations?
icon

Best answer by CarolK 6 November 2019, 16:26

View original

3 replies

Userlevel 7
Badge +37
Hi @ClairJ. I used this, and didn't have any problem with creating the logic branches and then putting them into a randomizer. This seemed to accurately present, in random order, only the blocks that applied based on the branch logic. (Of course, there may have been other logistical elements to your use case I'm not aware of, but on its face, I think this works.)
Userlevel 5
Badge +15
Thanks, @CarolK ! So to clarify, it should work if I set up branching this way:

Intro --> (if Block_1=1) --> Block 1 --> (if Block_2=2) --> Block 2 --> (if Block_3=3) --> Block 3

And then I could put Block 1, Block 2, and Block 3 into the randomizer?

I didn't even test this, because I was concerned that if it went to Block 2 first, there would never be a redirect to Block 1. But I'll set up a test version and try it out. This would be a great solution!
Userlevel 7
Badge +37
Intro -->
{randomizer}
-- (if Block_1=1) --> Block 1
-- (if Block_2=2) --> Block 2
-- (if Block_3=3) --> Block 3


That will randomize the logic and the blocks, to show them all in random order (but only those that apply based on the logic).

Leave a Reply