Hi,
I setup a survey question and I would like to use my participant response (a number between 0-100) as the limit for a random function (embedded data) in Qualtrics. The random function will be used to return a response in the next question for the person, e.g. "You gave away 80 points, and received 30 points in return". I need to utilize the participant response as the limit because setting rand (0:100) means that I might return values that are above the amount that the participant reported.
After going through the community posts, I understand that it is impossible to place embedded data directly in the rand to reference, since rand can only read numerals.
Is there a way to use Javascript to record the information?
Thank you very much for your help!
Solved
Javascript to record participant entry as value for embedded data
Best answer by npetrov937
Sure! Just get the piped text of your participant's response, put it in quotes and then call the parseInt method around the quoted piped text - that will force it to be interpreted as an integer and you can use it in your random function.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
