Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Token generate using first and last name

  • tomhklab
  • tomhklab's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #145319 by tomhklab
Hi, I was wondering whether it is possible for limesurvey to generate a token using the participant's first and last name. I know by default that limesurvey would randomize a token, but i would like to customize this feature so that it would generate the token using a format that I specify.

thanks.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago - 7 years 5 months ago #145322 by Joffm
Replied by Joffm on topic Token generate using first and last name
Hi,
just create your participants in a csv file and import it.
Here you can create the token the way you like. see screenshot.
Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 years 5 months ago by Joffm. Reason: Typo
The topic has been locked.
  • tomhklab
  • tomhklab's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #145326 by tomhklab
Replied by tomhklab on topic Token generate using first and last name
Thanks for the suggestion.
This is actually useful for me when I am migrate some participant data to limesurvey or for bulk creation.

However, is it possible to do this without csv, since i don't want to create a csv file every time I want to add a new participant. I was hoping that limesurvey can generate the token based on my specification.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #145328 by Joffm
Replied by Joffm on topic Token generate using first and last name
Hi, tomhklab,

why do you want to add patricipants one by one?
csv import is thought to import bulk.
If you add participants one by one, then you can enter them directly into the system and give the password you like. (screenshot)

And now the sophisticated way:
Create a SQL statement and enter the participants into the token table.
Of course: If you have access to it.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tomhklab
  • tomhklab's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago - 7 years 5 months ago #145333 by tomhklab
Replied by tomhklab on topic Token generate using first and last name
I am designing so that my co-workers (who are not IT-literate) can you use. I am hoping I can design this so most of the activities can be done by them, rather than me.

Maybe some background info might help [strike]expand[/strike] explain what i am trying to accomplish.
I work for a health related agency. I am helping my company design an assessment tool for our clinicians to record the client's satisfaction regarding the outcome for each session. each client will attend 10 session, and by the end of each session, the clinicians would distribute a survey to record whether the session was productive to the client's needs. Right now, this process is complete through is paper form, but I hope to use limesurvey to digitize this.

The goal is to automatize the entire process so our clinicians would require minimal effort to distribute and collect survey, but still be able to get feedbacks from our clients.

I am not saying our clinicians cannot use csv to import data, but i am hoping for something that's less technical, and more "click add, type info, click finish" process.
Last edit: 7 years 5 months ago by tomhklab.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #145335 by holch
Replied by holch on topic Token generate using first and last name
Well, Joffm gave you already the solution. In the token administration, when creating a new token, you can choose your own token.

His screenshot is in German, but the second input field, where it says "Zugangsschlüssel" you can actually define the token that you want. If you leave it empty and let Limesurvey generate the token, or use your token.

However, keep in mind that firstname + lastname might NOT be unique, which could be problematic. I guess each patient has a patient number that should be unique and the physicians should know that ID, right? Better use that than constructs like firstname / lastname.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
7 years 5 months ago #145370 by teracomp
Replied by teracomp on topic Token generate using first and last name
My approach is a bit different, but might be helpful if you have some php/mysql background.

In one case (for beta), I created a simple index.php form that captures the user's name (and a few other fields). When they submit the form, the script creates a user (unique id in my database) and passes that to LimeSurvey via Panel Integration.

Something like https://.... &id=333&firstname=John&lastname=smith.

If you map the id, firstname and lastname to hidden questions, you can store that data in your LimeSurvey results. You can also use PASSTHRU in Panel Integration if you have an end url that processes the information.

Dave Phillips
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #145375 by tpartner
Replied by tpartner on topic Token generate using first and last name
Similar to teracomp's approach, you could create a simple PHP file where the clinician enters the name, etc and then use the RemoteControl 2 API to add the client to the token table, customize the token and email the client.

- add_participants() - api.limesurvey.org/classes/remotecontrol...hod_add_participants
- set_participant_properties() - api.limesurvey.org/classes/remotecontrol...rticipant_properties
- invite_participants() - api.limesurvey.org/classes/remotecontrol..._invite_participants

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tomhklab
  • tomhklab's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #145396 by tomhklab
Replied by tomhklab on topic Token generate using first and last name
I will look into those options. Thanks for the suggestion.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose