Welcome to the LimeSurvey Community Forum

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

Accessing Custom Token attributes in survey

  • arunicbe
  • arunicbe's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago #124651 by arunicbe
I have created couple of custom attributes in the token table. I want to show and store these values as part of the survey.

Is it possible to access the custom attribute values in the survey?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #124653 by tpartner
Replied by tpartner on topic Accessing Custom Token attributes in survey
Please refer to the manual - Expression Manager, Access to variables - manual.limesurvey.org/Expression_Manager#Access_to_Variables

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: arunicbe
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 6 months ago #124655 by gabrieljenik
Replied by gabrieljenik on topic Accessing Custom Token attributes in survey
Complementing TPARTNER, you could add equation questions, prefilled with the token attributes.

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
More
8 years 5 months ago #126401 by tvanover
Replied by tvanover on topic Accessing Custom Token attributes in survey
Hi,

I added a custom attribute in the token table.
I made a hidden question of type 'equation', and in the field login - equation: I typed:
TOKEN:ATTRIBUTE_1

This stored the text 'TOKEN:ATTRIBUTE_1' in the response table.
I tried also with {TOKEN:ATTRIBUTE_1}, but then the field was empty.
I also tried with ={TOKEN:ATTRIBUTE_1}, then the field contained the character =

So what is the correct syntax to save that attribute in my response table?

thanks,
tom
The topic has been locked.
More
8 years 5 months ago #126428 by first
{TOKEN:ATTRIBUTE_1} works well . Please note that you would have to add it after clicking Source.



Survey Designer and Programmer
Attachments:
The topic has been locked.
More
8 years 5 months ago #126451 by tvanover
Replied by tvanover on topic Accessing Custom Token attributes in survey
Thanks. I had entered the code in the wrong field. It wasn't clear to me that it had to be in the "question" field.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose