- Posts: 4
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Generate Unique PIN for user
- mkb
- Topic Author
- Offline
- New Member
Trying to find the best way to do this:
I have a survey where the people taking it need to be anonymous (for their company info). It is possible that the person would like to get more information on their own after the survey. I thought that I could generate a unique PIN number that would show at the beginning of the survey with text telling them to remember this number for future use..yadda yadda. That way if they do want more info, they can tell us the number and we can just pull out their answers. The way this survey works..they cannot do it twice.
I cannot use token/emails..because the user would think their answers could be tracked back to them...also multiple users could be taking the survey on one computer at work..so IP wont give them away.
I read about insertrans, savedid, etc...not sure if what I want to do would apply.
Any help will be greatly appreciated,
Marilyn
- ricopoco
- Offline
- New Member
- Posts: 3
- Thank you received: 0
So, if this is doable, I too would greatly appreciate the info. Thanks much.
- mkb
- Topic Author
- Offline
- New Member
- Posts: 4
- Thank you received: 1
Just use: SAVEDID
It is my understanding that you have to have a question answered before it will show the number....so I just had a survey agreement where they click yes before they take the survey. I also placed it at the end of the survey as a reminder.
i.e. Please remember this number if you would like to discuss your individual results: SAVEDID (which will show the unique ID number).
I am not sure but I think I remember that the survey needs to be Active/Live before you will see the actual number.
My survey is now live and it is working just fine.
Hope this helps,
Marilyn
- ricopoco
- Offline
- New Member
- Posts: 3
- Thank you received: 0
- Mazi
- Offline
- Official LimeSurvey Partner
Marilyn,mkb wrote: Hi, Sorry I have been so busy lately I should have came back here and explained how I got this to work.
Just use: SAVEDID
It is my understanding that you have to have a question answered before it will show the number....so I just had a survey agreement where they click yes before they take the survey. I also placed it at the end of the survey as a reminder.
i.e. Please remember this number if you would like to discuss your individual results: SAVEDID (which will show the unique ID number).
I am not sure but I think I remember that the survey needs to be Active/Live before you will see the actual number.
My survey is now live and it is working just fine.
Hope this helps,
Marilyn
you are right at each point. The SAVEDID is the unique ID for each data set at the lime_survey_12345 table and it is only available for activated surveys AND you need to have clicked "next" at least once to store partial survey data and get such an ID assigned.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
- floccs
- Offline
- New Member
- Posts: 6
- Thank you received: 1
Anonymously track respondents answers across multiple surveys
This allow to track participants without the need to remember any ID.
- ricopoco
- Offline
- New Member
- Posts: 3
- Thank you received: 0
- TMSWhite
- Offline
- LimeSurvey Community Team
- Posts: 44
- Thank you received: 15
ricopoco wrote: Snooping around, it looks like SAVEDID is simply seqentiall numbers. I need something that would provicde IDs that are not easily be guessed. I'm going to try using a hidden question with the label "PIN" and the default answer to something like {time()*rand()}. Then I'll use INSERTANS to provide the PIN to the respondent. I'll post the details when I've worked them out and run some tests.
There is an example like that here . Create an Equation-type question, named PIN, and put this code in it:
That will ensure that PIN only gets generated once (instead of once per page visit and validation).
If you depend upon LimeSurvey or the support team, please give generously to our 2012 fundraiser .
- Expression Manager (EM):
Documentation
|
Sample Surveys
|
How Tos
|
Show Logic File
|
Upgrading to 1.92+ - Excel Style for Survey Structure Import/Export
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
I know that the chances is relatively small considering that you use the time stamp multiplied by a random number. But still there is a chance, right?
Rand would create a number from 0-9, right?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- Ben_V
- Offline
- Platinum Member
- Posts: 1128
- Thank you received: 329
holch wrote: Rand would create a number from 0-9, right?
Using {rand()} expression, I've always seen a quiet big 8, 9 or 10 digits number.
You can set some range precision with the following format :
{rand(99, 499)}
Related: Chance.js : Utility library to generate anything random for JavaScript
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
- Mazi
- Offline
- Official LimeSurvey Partner
Theoretically yes, but the chance is really, really low.holch wrote: Sounds good, but isn't there a slight chance that there could be duplicates like this?
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
- Ben_V
- Offline
- Platinum Member
- Posts: 1128
- Thank you received: 329
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)