generate an unique code at the end of the survey

More
2 months 2 weeks ago #197885 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

Please Log in to join the conversation.

LimeSurvey Partners
More
2 months 2 weeks ago #197910 by Joffm
Hi,
to understand this, please, explain

I only have the contact information of the participants that will fill out Part 2

Who are the participants who fill the first part?

That code will be a token for the next participant that will answer a part 2 survey.

How does this participant get it? By email?

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

Please Log in to join the conversation.

More
2 months 2 weeks ago #197911 by tpartner
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

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in to join the conversation.

More
2 months 2 weeks ago #197913 by Joffm
According 2)
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

Please Log in to join the conversation.

More
2 months 2 weeks ago #197920 by NeuroEconSolutions
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?

Please Log in to join the conversation.

More
2 months 2 weeks ago #197921 by NeuroEconSolutions
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

Please Log in to join the conversation.

More
2 months 2 weeks ago #197953 by DenisChenu
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.

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now