Randomly choose blocks from 2 groups of already randomized blocks | XM Community
Solved

Randomly choose blocks from 2 groups of already randomized blocks


Hi,
I have 2 groups of blocks: a group "A" with 36 blocks from which I randomly choose 10 blocks to present to a participant and other group "B" with 72 blocks from which I also randomly choose 10 blocks to present to a participant. The problem is that when I randomize this 2 groups the platform is presenting to a participant 10 group A blocks together and 10 group B blocks together, although it changes the group order between participants, but I want that the 20 blocks presented to a participant be randomized between groups A and B (for instance: A1, B3, B4, A9, etc.) .
Can someone please help me how to do this taking into account that I know nothing about programming and that this is the first Qualtrics survey that I developed?
I would really need your very urgent help please.

icon

Best answer by ahmedA 7 May 2021, 16:17

View original

18 replies

Userlevel 7
Badge +21

  1. Create two embedded data, A and B. Set their values to zero.

  2. Put each of the 108 blocks into a group with two things: The block and set the value of the respective ED to increase by 1. (Read Math Operations)

  3. On each block, add display logic to only show if their respective group is less than 10 (i.e. A< 10 or B<10)

  4. Put these 108 groups into the randomizer and randomize all

However, this is a pretty convoluted method and depending upon what you have in each block, something much simpler might do the job.

Thank you for your answer ahmedA. Could you please explain in a little more detail step 2 as I'm really a beginner in Qualtrics?

Userlevel 7
Badge +21

I'm assuming you know how to use groups, since you've mentioned that in your post.
Keep one block and one add embedded data in each group. The name of the embedded data will be A or B (same as earlier and depending upon the block), but its value will now be incremented by 1 (Equivalent to A = A + 1). Read the math operations support pages for this.
This way you'll have 108 (36+72) groups with one block and one ED each.

Thank you very much for your answer ahmedA.
Just to confirm, in the embedded data value of each group I should put $e(A+1) and $e(B+1) depending if it is A or B?

Hi ahmedA,
It is almost working (randomization ok), but with a major problem: as each block has several questions inside, the survey skips the first question (which is the one that has the skip logic) but asks the following questions that were supposed to just go together with that first one. Is it possible to put skip logic in a block all together or any other solution? Thanks a lot for your help.

Userlevel 7
Badge +21

You'll need to add display logic to each question you want to hide.

Thanks! Its like almost 500 questions but it is worth to give it a try :)

Userlevel 7
Badge +21

Like I said earlier, it's a convoluted method, and something much simpler could be used depending on what you have in the blocks.

Thanks anyway. I'll see if this solution solves the problem even if it takes some work. It was a great help. I'll let you know the result.

Back again... When I add the display logic to all the questions the survey shows one block of questions with embedded A and one block of questions with embedded B and ends, whatever value I put in the embedded data, although I have a randomization to show 10 blocks in the flow. It looks like after the first question of A (and of 😎 he assumes that has reached the limit :(
It is crazy. I'm trying to figure out what is happening, but it isn't easy.

This is what I have in the flow (with H and M instead of A and 😎, with just 27 groups for testing:
image.png

Userlevel 7
Badge +21

Have you tested if you math operations are working properly? They are quite finicky. From the looks of it, they might be causing the issue.
If it still persits, let me know.

Hi ahmed,
If you could help me a little more I would really appreciate :)
Regarding math operations I have:

  • in the survey flow, in the "Set Embedded Data" under each block and in the same group as the block: H=$e(H+1) or M=$e(M+1), as shown in the picture above

  • in each of 3 questions of each block I have display logic as follows

image.png(I have a 4th question in each block but it already as a display logic associated with the question that precedes it, that is, it only displays under certain conditions of the previous question, but it doesn't change anything with or without the addition of the embedded data condition, as expected)
So I dont know what else to do or to test and the present situation is as follows:
  • if I just add display logic to the first question of each block it shows the correct number (10) of randomized questions mixed from both situations M and H, but the questions are not necessarily the first question of each block (and it is mandatory that the first question is shown first)

  • if I add display logic to all the questions, only 2 blocks of questions are shown to each participant, instead of 10, and after that the survey ends.

Userlevel 7
Badge +21

MTADSLB.qsfTry and see if this QSF does what you are aiming for. If not, then I won't be able to assist you further, because I do not know what config of your survey you'll be compelled to disclose next. Perhaps you'll be better off asking another question, I'm sorry I tried to help because you had mentioned it's urgent.
For the future, disclose as much information as possible, if its confidential, then don't ask the question, go to support. Don't waste your and other's time by making it a treasure hunt.

I'm sorry ahmedA, but I didn't want to upset you and also I didn't know that I could send QSF. In fact it is urgent because I only found out this situation with the survey already running. And I thank you very much for all the help that you've being giving. I've replicated what you sent on my test survey (where I reduced the number of my blocks to make it easier to test) and I've being trying to make it work (I had to correct some mistakes that I was making, like not putting spaces before and after "+"), but there is still a remaining problem that I'm not able to solve: whenever A (or 😎 reaches the limit of 5, if the randomizer chooses another A (or 😎, the survey ends even if it didn't reach 10 blocks, that is, even if B (or A) didn´t reach the limit of 5, instead of moving to another group. I'm sending you the QSF in case you're willing to help me also on this issue, which I would very much appreciate (dont' worry about the progress bar, as it is counting only a total of 50%).
Teste_ordem.qsf

Userlevel 7
Badge +21

Should you be configuring the randomizer to show only 10 elements?

Yes the randomizer is configured to show just 10 elements because that is the number of blocks to be shown to participants. The problem is not there, but on the fact that when a counter A (or 😎 reaches the limit of 5 and the randomizer chooses another A (or 😎 the flow ends instead of moving to the next group.
Maybe I should ask a specific question for this.

Userlevel 7
Badge +21

Think about it.
Take a look at the survey flow, the groups and try to identify what's happening.

Leave a Reply