Welcome to the LimeSurvey Community Forum

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

Circumventing "Self" in questions

  • g3guy
  • g3guy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 6 months ago #142971 by g3guy
Circumventing "Self" in questions was created by g3guy
Hi

I'm experiencing a problem when I use the word "self" in questions given it being a "reserved" question, do I use an escape character?

Example:


The actual text should state - "Displays emotional self-control in times of high pressure".

Thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 6 months ago #142978 by DenisChenu
Replied by DenisChenu on topic Circumventing "Self" in questions
You surely have some bracket somewhere : manual.limesurvey.org/Expression_Manager
Or you put it somewhere where EM is used directly.

Strange : because Display emotionnal must show in red ....

Can you detail the process ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • g3guy
  • g3guy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 6 months ago #142985 by g3guy
Replied by g3guy on topic Circumventing "Self" in questions
Hi Denis

This is my expression:
Code:
{if(TOKEN:ATTRIBUTE_1=='Self','I display emotional self-control in times of high pressure','Displays emotional self-control in times of high pressure')}

Resulting in the "reserved" word kicking off and showing up that error.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 6 months ago #142987 by tpartner
Replied by tpartner on topic Circumventing "Self" in questions
I see that as a bug. Anything in quotes should be parsed as a text string, not a variable name. Please file a bug report.

As a workaround, try loading TOKEN:ATTRIBUTE_1 into an equation question and then reference that in your expression.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • g3guy
  • g3guy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 6 months ago #142989 by g3guy
Replied by g3guy on topic Circumventing "Self" in questions
Thanks Tony - will do so! (will be my first bug report)

Actually, my workaround was quite simple - I just capitalised the "S" - so "Self-control" works fine. Although it just jars the respondent's reading though.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose