How to include a random number/password generator into a survey | XM Community
Skip to main content

Hello there! I'm a bit new to qualtrics, so don't quite know how customizable some of this stuff is.
I'm planning on sending out a parent-student survey, where responses will be anonymous but I would like to be able to keep the parent's results linked to their respective student.
The best idea I've had so far is to, on the same page where parents will sign for consent ('page 1' of the student survey), include a random password generator (something 4-5 characters long, nothing complicated) and a link for the parents to click to head to the parent survey. When they follow that link, they would then be asked to enter in that same password so that I'll be able to match the parents with the students at a later date. That randomly generated code would also need to be auto-populated into a similar field in the students survey, of course.
How should I go about doing this? Or perhaps there's a less round-about way of sending out linked surveys I don't know about?

Hi Tes
I had to test if I could solve this and I actually just did. So there is a way that potentially could solve this for you.
The way I set this up is to have one Student-survey and another Parent-survey. And I need to assume that you know both StudentEmail and ParentEmail.
The Student survey holds embedded data that randomly gives a number, and another embedded data that captures that number.
In my survey flow I set it like this:
image.png"Int" is the random number between 1 and 1500 (you can change these of course), and the "Inte" is the one that captures the random number that was given the Survey response.

Once that is done you set up a workflow within the student-survey where an email is triggered once a survey response comes in and sent to the ParentEmail.
This is what my test looked like:
image.png
In this email is a link to the Parent-Survey and the link contains the random number given in the student-email as embedded data.
The survey link for the email to the parents could look like this:
https://[your domain]/jfe/form/[survey ID]?ParentEmail=${e://Field/ParentEmail}&Inte=${e://Field/Int}
(This is for testing purposes of course. You can add what ever embedded data you want here.)

This way the student-survey get a random number, that is then passed to the parent-survey and registered on their response so you can compare the two during your analysis.
Hope this helps and if there are questions just reach out!
All the best
-Mattias


Oh, and remember that you need to set the exact same Embedded data in the Survey Flow on the parent-survey project to be able to catch them.


MattiasM Thanks a ton for your reply!! Yeah, this is really close to what I'm looking for. I don't quite have a roster of patent and student emails, per say-- instead, I'm going to utilize a school's email newsletter to get the survey out. Still, you're explanation has got me like 95% there. The only thing I still need to figure out is how to avoid repeated codes, so multiple sets of parent-student surveys don't (by chance) receive the same code.
Setting up a way to guarantee mutual exclusivity between surveys sounds like a massive pain in the ass, so instead I'm wondering if there's a way to generate a random hash instead of just a random number between 1:1500. Or is there some other unique identifier for the student survey I could use to generate a code for the parent survey?
Perhaps another thing I'm having a hard time figuring out is what syntax language qualtrics uses. I'm familiar with matlab and C++, and I think I've read this is Javascript, but I can't seem to find anything that looks like the ${e://______} syntax we use in qualtrics. I know this is a pretty stupid question, but what language is this?
Tes


Tes ,
I think a more straight forward approach would be to use the Qualtrics generated response id from the student survey and pass is as a url parameter to the parent survey. So the link to the parent survey would look like:
https://[your brand].qualtrics.com/jfe/form/[survey ID]?srid=${e://Field/ResponseID}
Make sure you define srid as an embedded data field in survey flow of the parent survey.


https://community.qualtrics.com/XMcommunity/discussion/comment/45404#Comment_45404That was actually my first attempt, but I couldn't get it to work when I was testing the setup. The Response ID is unique and the very best to compare and link two responses to each other.
Thanks for this!
-Mattias


Leave a Reply