Welcome to the LimeSurvey Community Forum

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

Set Yes/No question answer based on EM evaluation

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 9 months ago #202008 by blocka
I need to set a Yes/No question based on the evaluation of another question, so I can use the Yes/No in a quota.

So I have a slider question, allowing values from 0 to 10. Question Code is A3

I then have a Yes/No question (Question code Eligible) where I use : {if((A3_SQ001==0),"N","Y")}

thinking that this would set Eligible to Yes if A3_SQ001 = 0

But this doesn't seem to work.

Can someone point me in the right direction to get Eligible's answer to be No, if A3_SQ001 is = 0 ?

File Attachment:

File Name: group_489.lsg
File Size:6 KB
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago - 3 years 9 months ago #202010 by Joffm
You have to set the value of "Eligible" in an equation
{Eligible=if((A3_SQ001==0),"N","Y")}

But if it is only needed for the quota it is sufficient to have a question of type equation called "Eligible" with
{if((A3_SQ001==0),0,1)}
You can set the quota on this equation.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 9 months ago by Joffm.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose