Welcome to the LimeSurvey Community Forum

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

Associate Participant's attribute information with Survey

  • wingman123
  • wingman123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126714 by wingman123
Hi Lime gurus,

Is there a way to associate a participant's attribute information into a survey.

For example say I created a participant attribute called "Mailing Address" and assigned it a value. Is there any way, even using an api within the code perhaps to load this information into a survey

Thanks
The topic has been locked.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 5 months ago #126715 by holch
So you are using tokens, I assume and you created a custom attribute, let's call it attribute_1, that contains the Mailing address, correct?

If the survey is not set to annonymous, you cann access this infomration via Expression Manager in the following way (not checked, just from the top of my head, have a look at the manual):
Code:
{TOKEN:attribute_1}

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.
  • wingman123
  • wingman123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126717 by wingman123
Thanks for the response! Realized I didnt do my homework well enough theres quite a few other posts as well on this. I will try it out and see how it goes.

Best
The topic has been locked.
  • wingman123
  • wingman123's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #126718 by wingman123
Everything worked great!

To share, I used the mapped attribute name in all caps
So:
mailingaddress = attribute_2 is referenced as:
{TOKEN:ATTRIBUTE_2}
I was also easily able to pre-fill an answer with the same reference in question->edit default answers for this question-> {TOKEN:ATTRIBUTE_2} in text field

Best
The following user(s) said Thank You: holch, cdorin, Bubilla2020
The topic has been locked.
More
4 years 7 months ago #187913 by Bubilla2020
Gracias a ti pude resolver mi error. :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose