Hi everyone,
In my Qualtrics survey, I have a question for which I use loop & merge. Field 1 is an id that takes values 1 or 2 (for testing purposes). I set the loop and merge to randomize loop order and present only 1 of total loops.
At the top of the survey flow, I create an embedded data variable "id" (and "receiver1id"), leaving it empty.
In javascript I write the following code. The problem is that id and "receiver1id" are always empty. Could anyone point out my mistake?
Qualtrics.SurveyEngine.addOnload(function()
{
//input
var id = parseInt("${lm://Field/1}");
// output to id
Qualtrics.SurveyEngine.setEmbeddedData(id, receiver1id);
Qualtrics.SurveyEngine.setEmbeddedData(id, id);
});
Thank you!
Saving Loop and Merge Field into Embedded Data Variable
Best answer by rondev
The setEmbedded data function should be like below:
Qualtrics.SurveyEngine.setEmbeddedData("id", id);
Qualtrics.SurveyEngine.setEmbeddedData("receiver1id", id);
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.
