Hello,
I have a block where I utilize Loop & Merge in order to choose one value from a set of values. As such, the loop only occurs once.
For example, Field 1: 10, 20, 30, 40, 50.
1 random loop may choose 20.
I want to input text in subsequent blocks that incorporates 20 or whatever was chosen in the loop.
-------------------------------------------------------------------------------------------------------------
Example:
Block 1: 20 is chosen from [10,20,30,40,50] by loop & merge function
Q1: "You are receiving $20 for this study"
Final Block:
Qi: "Thank you for participating in this study. You will receive $20."
-------------------------------------------------------------------------------------------------------------
I am hoping to do this because the random amount reappears in many blocks. With something like display logic or then if branches, I would have to create r x q iterations. Where r is the amount of possible random values and q is every question/text where that value appears. Right now, that is 8 x 20......
How do you carry a value from a loop & merge into a new block?
Best answer by TomG
A loop & merge probably wasn't the best choice for picking a random number. Anyway, now that you've done it that way, the easiest way to pipe the random value going forward is to add JS to your loop question to save it to an embedded data field.
Qualtrics.SurveyEngine.addOnload(function() {
Qualtrics.SurveyEngine.setEmbeddedData("randAmt","${lm://Field/1}");
});
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
