Welcome to the LimeSurvey Community Forum

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

Import and assign custom test keys after completing a survey

  • cupkax
  • cupkax's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #211593 by cupkax
Hiya,
I have a csv file with tester keys and two custom attributes.
For e.g.
testerkey , attr1 , attr2
100ABCDE , 0 , L
101ADBDF , 1 , R
102EQWER , 0 , R
103HUJTR, 0, L

The participants complete the survey and depending on their answers (to the last question) they are to be assigned a testerkey and the custom attributes from the aforementioned .csv file. These assigned variables are then sent to them through an email

For e.g.

Hi John Doe,
This is you tester key: 100ABCDE
To continue the study go to: www.foobar.com/?testerkey= 100ABCDE&customattr1=0&customattr2=L

My question is, how do I import the tester keys and the attributes from the csv file into the email notifications?
I haven't used tokens as this is a university survey with the link available to all students.
 LimeSurvey version is v3.25.9 non-admin access.

Cheers.
Last edit: 4 years 4 months ago by cupkax.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago - 4 years 4 months ago #211626 by tpartner
You can use the jQuery get() function to load the CSV data, parse it with Evan Plaice's jquery-csv component and load hidden short-text questions with the appropriate values. Those hidden questions can be accessed in the email template.

Inspiration - forums.limesurvey.org/forum/can-i-do-thi...-map?start=30#197865

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 4 months ago by tpartner.
The topic has been locked.
More
4 years 4 months ago #211656 by jelo
If I get it right, the solution via Jquery exposes the complete data source to anyone capable of looking into the htmlsource? I sense one more use case for internal static lists accessible via ExpressionScript and QuestionTypes.
bugs.limesurvey.org/view.php?id=11688

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose