Search code examples
loopsrandomgraphicssurveyqualtrics

Advanced Loop & Merge in Qualtrics - Multiple random fields


I have a somewhat cumbersome Qualtrics question about randomization/Loop & Merge.

I am trying to run a study where participants answer questions about 10 different scenarios, each of which has two variants (call them A and B). All of these are given by displaying a different .jpg file above a set of the same 3-4 questions. We'd like to randomize whether they see A or B for each individual scenario, but ensure that they see each scenario once. We'd also like to intersperse 4 filler scenarios (only one variant each).

So the survey flow would look something like this:

  • Random scenario 1 of 10 (randomly A or B)
  • Random scenario 2 of 10 (randomly A or B)
    • Random filler 1 of 4
  • Random scenario 3 of 10 (randomly A or B)
  • Random scenario 4 of 10 (randomly A or B)
    • Random filler 2 of 4
  • Random scenario 5 of 10 (randomly A or B)
  • Random scenario 6 of 10 (randomly A or B)
    • Random filler 3 of 4
  • Random scenario 7 of 10 (randomly A or B)
  • Random scenario 8 of 10 (randomly A or B)
    • Random filler 4 of 4
  • Random scenario 9 of 10 (randomly A or B)
  • Random scenario 10 of 10 (randomly A or B)

I know how this would work with question or choice randomization, and I know how to do a simple Loop & Merge, but this has me stumped. Is there any way to do this without using a clunky fix such as duplicating the question block ~14 times?

Thanks in advance for your help.


Solution

  • First set up ten randomizers, one for each scenario, in the survey flow. For each randomizer pick one of two embedded data blocks - block A or block B:

    scenario1 = A
    scenario1_img = [insert url of image A here]
    

    .

    scenario1 = B
    scenario1_img = [insert url of image B here]
    

    Create a single select multiple choice question before the loop & merge block with the following choices:

    ${e://Field/scenario1_img}
    ${e://Field/scenario2_img}
    [insert filler 1 image url here]
    ${e://Field/scenario3_img}
    ${e://Field/scenario4_img}
    [insert filler 2 image url here]
    ${e://Field/scenario5_img}
    ${e://Field/scenario6_img}
    [insert filler 3 image url here]
    ${e://Field/scenario7_img}
    ${e://Field/scenario8_img}
    [insert filler 4 image url here]
    ${e://Field/scenario9_img}
    ${e://Field/scenario10_img}
    

    Then add advanced randomization to the question to randomize the scenarios:

    {randomized}
    {randomized}
    [insert filler 1 image url here]
    {randomized}
    {randomized}
    [insert filler 2 image url here]
    {randomized}
    {randomized}
    [insert filler 3 image url here]
    {randomized}
    {randomized}
    [insert filler 4 image url here]
    {randomized}
    {randomized}
    

    Hide the question using JavaScript (it should be on the same page as another question, otherwise the script also has to click the Next Button) and make sure it is NOT forced response.

    Qualtrics.SurveyEngine.addOnload(function() {
        $(this.questionId).hide();
    });
    

    Set up the loop & merge block to loop based off the displayed choices in the question above. Do not randomized the loop. If additional fields are needed for piping add them.

    Pipe the images into an img tag in a question's text:

    <img src="${lm://Field/1}">