- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
generate an unique code at the end of the survey
- NeuroEconSolutions
- Topic Author
- Offline
- New Member
Less
More
3 years 11 months ago #197885
by NeuroEconSolutions
generate an unique code at the end of the survey was created by NeuroEconSolutions
Hello! We are working on a survey that has two parts. Part 1 is filled out by a participant and, ideally, at the end, an unique code is generated. That code will be a token for the next participant that will answer a part 2 survey.
Is that possible with Limesurvey?
I read a lot of threads but they explain how to set up tokens at the beginning of the survey, not end.
I only have the contact information of the participants that will fill out Part 2
Thank you in advance for any help/guidance
Is that possible with Limesurvey?
I read a lot of threads but they explain how to set up tokens at the beginning of the survey, not end.
I only have the contact information of the participants that will fill out Part 2
Thank you in advance for any help/guidance
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12905
- Thank you received: 3968
3 years 11 months ago #197910
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic generate an unique code at the end of the survey
Hi,
to understand this, please, explain
Is there any relation between the first and second participant? Or is it at random?
Anyway: There is a participants table of the second survey.
So I'd do an ajax call in the first survey that calls a remote script.
Here you query the database of the second survey - the participants table (directly or by the API), select a participant, who didn't answer yet, and return his token.
Now you have a valid token of the second survey of one of the participants.
But as I said: Maybe I misunderstand something.
Joffm
to understand this, please, explain
Who are the participants who fill the first part?I only have the contact information of the participants that will fill out Part 2
How does this participant get it? By email?That code will be a token for the next participant that will answer a part 2 survey.
Is there any relation between the first and second participant? Or is it at random?
Anyway: There is a participants table of the second survey.
So I'd do an ajax call in the first survey that calls a remote script.
Here you query the database of the second survey - the participants table (directly or by the API), select a participant, who didn't answer yet, and return his token.
Now you have a valid token of the second survey of one of the participants.
But as I said: Maybe I misunderstand something.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10100
- Thank you received: 3589
3 years 11 months ago #197911
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic generate an unique code at the end of the survey
Another alternative...
1) Use Denis' generateUniqId plugin to create a unique Id.
- www.limesurvey.org/forum/can-i-do-this-w...-participants#197872 .
2) Make an AJAX call to a remote PHP script that creates a token in the second survey with that ID and invites the participant.
- www.limesurvey.org/forum/development/120...-custom-token#193943
1) Use Denis' generateUniqId plugin to create a unique Id.
- www.limesurvey.org/forum/can-i-do-this-w...-participants#197872 .
2) Make an AJAX call to a remote PHP script that creates a token in the second survey with that ID and invites the participant.
- www.limesurvey.org/forum/development/120...-custom-token#193943
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12905
- Thank you received: 3968
3 years 11 months ago #197913
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic generate an unique code at the end of the survey
According 2)
Shows again that I am not so very familiar with the API.
I only queried, but never set.
Joffm
Shows again that I am not so very familiar with the API.
I only queried, but never set.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- NeuroEconSolutions
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
3 years 11 months ago #197920
by NeuroEconSolutions
Replied by NeuroEconSolutions on topic generate an unique code at the end of the survey
Thank you Joffm
The participants that fill out Part 1 are patients with a specific disease (MS), Part 2 is filled out by their treating Physician
So, no, it isn't random
I know the physician's info and aprox how many patients they can enroll
Later last night, I was thinking if I could set up the participants table (with the Physicians info) assigning a token for each with 2-3-4 etc number of uses for each token (number of uses = number of patients each physician enrolls)
I could provide the token name to each physician
would sth like that work?
The participants that fill out Part 1 are patients with a specific disease (MS), Part 2 is filled out by their treating Physician
So, no, it isn't random
I know the physician's info and aprox how many patients they can enroll
Later last night, I was thinking if I could set up the participants table (with the Physicians info) assigning a token for each with 2-3-4 etc number of uses for each token (number of uses = number of patients each physician enrolls)
I could provide the token name to each physician
would sth like that work?
The topic has been locked.
- NeuroEconSolutions
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
3 years 11 months ago #197921
by NeuroEconSolutions
Replied by NeuroEconSolutions on topic generate an unique code at the end of the survey
Thank you, I will need to look into this options, I am VERY "fresh lemon" and need to understand this more and learn before trying it
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13622
- Thank you received: 2489
3 years 11 months ago #197953
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic generate an unique code at the end of the survey
If i don't make error : it's the purpose of this plugin
gitlab.com/SondagesPro/SurveyAccess/surveyRegister
I must do the README …
Each attribute can be filled by a question in the 1st survey.
gitlab.com/SondagesPro/SurveyAccess/surveyRegister
I must do the README …
Each attribute can be filled by a question in the 1st survey.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.