Welcome to the LimeSurvey Community Forum

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

Displaying attributes with expression manager gives error "undefined variable"

  • EvaChr
  • EvaChr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 4 weeks ago #266407 by EvaChr
Your LimeSurvey version: Community edition Version 5.6.26
Own server or LimeSurvey hosting: studentische-umfragen.uni-hamburg.de

==================
Hello everyone,

I am trying to display individual responses from a previous survey in a new survey by using attributes and the expression manager. I know, I have managed to do so about 6 years, but right now I cannot figure out what I’m doing wrong. I know, many had similar trouble before me, but unfortunately I was not able to identify a solution in the help forum (nor in the manual).

Here is what I’m doing:
  • I create a survey in closed access mode.
  • I create an attribute called “Reply1” (see Screenshot 1).
  • I create a new user, enter “test” in “Reply1” and generate an access code (see Screenshot 2).
  • I create a question group and try to display Reply1 by using "TOKEN:Reply1" in the description. (I also test "TOKEN:attribute_1" since that was the name of the attribute that LimeSurvey created automatically.)  (see Screenshot 3)
  • I do the same this time using a question of type “text display”  (see Screenshot 4).
  • I activate the survey, make sure that “anonymous responses” is set to “No” and start the survey as the test user. The attribute is not displayed correctly and when I hover over the field, I get the message “variable undefined”  (see Screenshot 5).
What am I doing wrong? Did I miss an option that I need to check for the expression manager to work?

Thank you very much in advance for trying to help me!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 4 weeks ago #266409 by holch
{TOKEN:Reply1} will definitely not work.

So this is correct.

{TOKEN:attribute_1} should work though. Difficult to see what might be wrong from the screenshots. Der Teufel liegt manchmal im Detail.

Try using TOKEN:ATTRIBUTE_1 instead and see what happens.

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

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 4 weeks ago #266413 by tpartner
Yup, needs to be uppercase TOKEN:ATTRIBUTE_1 or ATTRIBUTE_1.

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: holch

Please Log in to join the conversation.

  • EvaChr
  • EvaChr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 4 weeks ago #266419 by EvaChr
I had tried that option too since it was written like that in the manual, but I probably had a typo there. This is indeed the solution fpr my problem! Thank you so much for your help and your quick reply!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose