Hi community! Here's a scaled-down version of what I need:
Set-up: We're rolling 6-sided dice to determine payouts. Participants see 3 Scenarios. Each scenario will be displayed one-at-a-time in tables like these:
Need: I need to randomize along two dimensions: (1) The order that the Scenarios are presented to participants (e.g., sometimes the order is A-C-B sometimes it's C-B-A, etc.) & (2) the dice numbers that are winners (e.g., for Scenario B, sometimes the $10 payouts occur if you roll a 2, 3, or 6 and sometimes they occur if you roll a 1, 4, or 5, etc.).
Attempted: Right now I have loop & merge set up where each row of the L&M table corresponds to a different Scenario and I select the option to randomize the order that rows are displayed. However I have manually coded the L&M table so that for Scenario A : Field 1 = $10, Fields 2-6 = $0; for Scenario B: Fields 1-3 = $10, Fields 4-6 = $0; for Scenario C: Fields 1-4 = $10, Fields 5-6 = $0).
Problem: This fixes the "roll of the dice" numbers that corresponding to winning $10 or $0. I need to randomize that. What I need is a way to randomize the order of fields too!
I think I could accomplish this by having a separate block for each Scenario, using L&M within each block, and then using a Randomizer (in the Survey Flow) to randomize the order of the scenarios. But this isn't viable for me because the above is just a tiny example--in fact I have 50 different scenarios (each scenarios randomizes 1-100, not 1-12). So it's not practical for me to create 50 different blocks, 1 per scenario (for instance, if I need to make a small tweak to one question, then I need to do it for all 50!).
**I don't think Loop & Merge is the right solution here. Maybe embedded data? Maybe JavaScript?**
Any solutions would be much appreciated. I do not know JS, unfortunately.
Thanks for any help you can attempt!
Randomize order of fields within a loop & merge row (JS?)
Best answer by MSobotta
It's a pretty quick design. Loop and Merge will not allow you to change your randomizer for what the winners are. That's the snag. In the simplest form it's pretty easy to duplicate the logic. Preview Link: https://feedback.digikey.com/jfe/preview/SV_2rBqFlgTXfR7aLk?Q_CHL=preview&Q_SurveyVersionID=current
Ranomizer: Present 3 of the following elements:
Group: Scenario A
Initialize all Dice Rolls as 0
Randomizer: Present 1 of the following elements:
ARoll1 = 10 // One element (embedded data) to set 1 as the winner
ARoll2 = 10 // One element to set 2 as the winner
ARoll3 = 10 // One element to set 3 as the winner ...
ARoll4 = 10
ARoll5 = 10
ARoll6 = 10
Show Block: Scenario A // This is where you display $${e://Field/ARoll1} for each number
Group: Scenario B
Initialize all Dice Rolls as 0
Randomizer: Present 2 of the following elements:
BRoll1 = 10 // One element (embedded data) to set 1 as a winner
BRoll2 = 10 // One element to set 2 as a winner
BRoll3 = 10 // One element to set 3 as a winner ...
BRoll4 = 10
BRoll5 = 10
BRoll6 = 10
Show Block: Scenario B // This is where you display $${e://Field/BRoll1} for each number
...
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
