Welcome to the LimeSurvey Community Forum

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

How to evaluate "other"?

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 7 months ago #204166 by blocka
How to evaluate "other"? was created by blocka
For a single or multiple choice question, where Other is enabled...

How do I evaluate to see if Other was selected?

I would have though something like if(Q1_other=="Y",1,0) but that doesn't seem to work....
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #204167 by Joffm
Replied by Joffm on topic How to evaluate "other"?
Answering by phone.
Activate the survey, enter some data, have a look at the responses.
That's always the best to find out.
Should be something like
Q1=="-oth-" for single and
Q1other=="Y".
I am not absolutely sure.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 7 months ago #204176 by blocka
Replied by blocka on topic How to evaluate "other"?
Thanks! 50% of the way there ....

This works for list type:

{if(Q1=="-oth-","other","nope")}

For multi, this doesn't work:

{if(Q2other=="Y","other","nope")}
nor
{if(Q2_other=="Y","other","nope")}
nor
{if(Q2_other =="-oth-","other","nope")}

So, still pondering multiple choice Other evaluation....
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 7 months ago #204177 by blocka
Replied by blocka on topic How to evaluate "other"?
Found this in manual (imagine that). For multiple, this seems to work:

{if(Q2_other.shown,"other","nope")}
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #204180 by tpartner
Replied by tpartner on topic How to evaluate "other"?
Multiple-choice:

Code:
{if(!is_empty(Q2_other),"other","nope")}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #204182 by Joffm
Replied by Joffm on topic How to evaluate "other"?
Hi,
if you had followed my advise you would have seen in the answer table


So either "Q1_other" contains the text or is empty.

But this way you had the chance to read the manual. ;)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose