Guarantee a unique ID | XM Community
Solved

Guarantee a unique ID

  • 16 October 2020
  • 6 replies
  • 780 views

Hello All,
I would like to create a unique ID for respondents. I saw this. Does it guarantee a unique ID?
The word `random` makes it a bit confusing, because it could generate a duplicated number.
Could you clarify it for me?
Regards,
Paulo

icon

Best answer by TomG 17 October 2020, 00:05

View original

6 replies

Userlevel 7
Badge +27

No, that process does NOT guarantee a unique id. It just produces a random number in a range.

Hello @TomG,
Thank you for your answer.
Could you point me to a documentation that stands it? I would like to put it together with my project.
I believe the ResponseID is the one that I have to pass to the a next survey, though. Am I right?
Regards,

Userlevel 7
Badge +27

Yes, ResponseID is a unique id that Qualtrics assigns to a survey response.

Hello everyone,
First post! I am also in a similar situation as pepcmarques on trying to figure out a way to assign a randomised and unique ID with guaranteed NO REPEAT.
I understand that Qualtrics has the function to assign a randomised ID but there's still a risk (though allegedly extremely rare) of ID number repeating.
A work around I am thinking is to upload a spreadsheet with the list of pre-determined, randomised unique IDs and somehow assign these to the survey respondents one by one.
Is this possible?
Thank you Qualtrics community!


Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/36665#Comment_36665As noted above, Qualtrics assigns a unique id called ResponseID to each response. If you can use that, you don't need to assign your own unique id.
As far as the using your own list of random ids, you could store your list of ids in a database table on a web server and use a web service to grab a new one for each respondent.

If you need unique ids, there's an easier way than setting up a web service.
Set up a multiple choice question with your numbers 1 through 10,000 as the choices (or however many unique IDs you need). Use Choices --> Edit Multiple to paste in these choices.
Then use Advanced Randomization to select a random subset of 1 from all the numbers and click "Evenly Present" (Evenly Present is what tells Qualtrics to use every number before reusing any). Use JavaScript to hide the multiple choice question:
$(this.questionId).hide();
...and pipe the unique random number into a subsequent question that displays to the participant:
${q://QID1/ChoiceGroup/DisplayedChoices}
Credit for this idea:
https://stackoverflow.com/a/47844423/6174844

Leave a Reply