Set the value of an embedded data to the name of the block I want to show | XM Community
Skip to main content

Hi,
Is it possible to set the value of an embedded data to the name of a block and then find and show the corresponding block based on the value of that embedded data?
Thanks in advance for your help.

Survey flow is unrelated to block names. You can use embedded data and survey flow branching to display question blocks.


Thank you so much for your response TomG .
Actually I'm new to Qualtrics, so I don't know whether I'm thinking in the right way or not. But the reason I'm asking this question is that I want to design a survey for an experiment with the following description:
The study has 12 scenarios in total. Each scenario has two versions/conditions: conditionA and conditionB. I want each subject to see all the 12 scenarios in random order, with half of the scenarios shown in their conditionA and the other half shown in conditionB. The order of the conditions are also randomized. Therefore, each subject sees 6 randomly chosen scenarios in conditionA and the remaining 6 scenarios in conditionB with random order.
I was wondering whether I can achieve the randomization with something like javascript and then set the value of embedded data to the name of the blocks containing each scenario I want to show to each participant (in the order generated by the code) and then use the name of the block to display them.
Do you think this would be the right way to approach this problem? Could you please guide me in how I can design this experiment if there is a better solution?


Setting the randomized order of the blocks from your JavaScript would be awfully difficult. You should let Qualtrics randomize the blocks. Assuming you have 24 blocks (12 scenarios + 2 conditions per scenario), you can have your JavaScript set 24 embedded variable flags (A1, A2, B1, ... , X2) that specify whether a block should be displayed or not. Then inside a survey flow randomizer add 24 branches with a block in each one:
Randomizer (Display 24 of 24)
Branch If A1 = 1
Block A1
Branch If A2 = 1
Block A2
...
Branch If X2 = 1
Block X2


Leave a Reply