Welcome to the LimeSurvey Community Forum

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

Relevance Equation and Tokens/Answers

  • exlibris139
  • exlibris139's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #116055 by exlibris139
Relevance Equation and Tokens/Answers was created by exlibris139
I'm trying to display a set of questions to people who input a token or an answer (whichever is easier) that begins with a certain letter. I can't only have them enter the letter, as it's a giveaway that there's a variance in what people are seeing with the survey. So they may be told to enter A123 or B123 depending on their group, and As should see different questions to Bs.

I've been trying to use wildcards with relevance equations on the questions, but I can't seem to make it work. Any suggestions?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 2 months ago #116066 by tpartner
Replied by tpartner on topic Relevance Equation and Tokens/Answers
Relevance using a text question (code "q1"), first character "B":
Code:
substr(q1, 0, 1) == 'B'

Relevance using a token, first character "B":
Code:
substr(TOKEN:TOKEN, 0, 1) == 'B'

manual.limesurvey.org/Expression_Manager#Access_to_Functions


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • exlibris139
  • exlibris139's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #116074 by exlibris139
Replied by exlibris139 on topic Relevance Equation and Tokens/Answers
That's perfect tpartner, thanks for that!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose