Dear Qualtrics Community,
I am doing a Survey where I ask people to pick their top 3 preferred majors. To make sure they don't get mistaken, I created 3 groups that correspond to First Choice, Second Choice and Third Choice. So they would have to drag from the list of majors just one option per box ( I attach a picture). I wanted to be able to retrieve their First Choice later in the survey, something similar to what ${q://QIDX/ChoiceGroup/ChoiceWithLowestValue} is for the rank question.
Does anyone has an idea of how I could do it?
Thanks a lot!
How to carryforward the first ranked choice in a group in a Pick, Group and Rank question.
Best answer by Gaiag2
I just found a workaround to make it work!
For anyone who is interested, I extracted a portion of the piped text that is storing the 3 selected choices, precisely, I extract the digits before the comma. Here below the code:
Please note that this code has to be placed after the Pick, Group and Rank question and you can star displaying the substring from the question after the one where you put the code.
Qualtrics.SurveyEngine.addOnload(function()
{
var str = "${q://QID26/ChoiceGroup/SelectedChoices}";
var FirstChoice = str.substring(0,str.indexOf(","));
Qualtrics.SurveyEngine.setEmbeddedData("FirstChoice", FirstChoice);
});
Qualtrics.SurveyEngine.addOnReady(function()
{
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
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.
