Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: End Survey if a specific answer was chosen using conditions.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64578

  • PureRED
  • PureRED's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
I'm a total beginner to LimeSurvey and after digging around I can't really find anything on the topic other than some JavaScript.

Say I'm conducting a survey for women only and someone selects male as their gender. I'd like to end the survey there.


Can anyone guide me along?
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64582

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Yep, see "quotas" - docs.limesurvey.org/quotas&structure=Eng...tions+for+LimeSurvey
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64584

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5446
  • Thank you received: 814
  • Karma: 240
Just to give you an additional hint to Tony's tip: the quota for men would be zero. ;-)
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | [url=https://manual.limesurvey.org/Workarounds[/url]

If you found this answer helpful and it saved you some time please consider a [url=https://donate.limesurvey.org[/url] to the...
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64590

  • PureRED
  • PureRED's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Amazing! Thank you both!
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64598

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 84
  • Karma: 37
quotas are an elegant solution.

Another option coming in LimeSurvey 1.92 is to use Relevance based branching.

Say you have a Yes-No question called 'female' asking, "Are you female?". For each of the rest of the questions, you would use a Relevance of
female != 'Y'

That would automatically hide all of the other questions, even if they are all on the same page.

A more common use is to ask a bunch of different information that must be known before completing the survey, such asking the person's gender, age, level of education, and marital status. Then, you could have a single Equation-type question called 'ask' like:
{(female == 'Y' and age > 30 and maritalStatus=='single' and (educationLevel=='PhD' or educationLevel='MD'))}

Then, all subsequent questions would use the relevance:
ask

Which would ensure that those questions were asked only of single women over 30 years old who have an MD or Ph.D.

For more information, see the discussion of Expression Manager
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64600

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5446
  • Thank you received: 814
  • Karma: 240
Hi Thomas,

I wouldn't say that quotas are an elegant solution. Well, the most elegant solution possible at the moment.

The Expression Manager sounds impressive and I can't wait to see and test it in 1.92.

But I think for this what we would really need in the future would be custom end pages where we can direct the respondents when they are screened out, because for a long survey it can get quite annoying to put a condition or a code like the one from expression engine to each of them.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | [url=https://manual.limesurvey.org/Workarounds[/url]

If you found this answer helpful and it saved you some time please consider a [url=https://donate.limesurvey.org[/url] to the...
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64603

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9600
  • Thank you received: 1376
  • Karma: 390
Hello,

Actually, with quota, survey are marked Q and not finished, i think it's a good solution, now ?

:)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64604

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5446
  • Thank you received: 814
  • Karma: 240
Yes, this is the good part. And yes, actually it is some kind of quota we are applying.

But I think most people are used to having some kind of "screen out", which usually is different to quotas set. But you are right. A screen out is actually some kind of zero quota.

But what is more important, that if you don't want necessarily end the survey there, it can be quite cumbersome to skip questions with the conditions how they are resolved at the moment.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | [url=https://manual.limesurvey.org/Workarounds[/url]

If you found this answer helpful and it saved you some time please consider a [url=https://donate.limesurvey.org[/url] to the...
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64605

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9600
  • Thank you received: 1376
  • Karma: 390
Hello,

One another good think with quota, is the specific URL for each quota \o/

:)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64606

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5446
  • Thank you received: 814
  • Karma: 240
Definitely, otherwise it wouldn't really work as a screenout. But with the specific URL, this works, also for panels.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | [url=https://manual.limesurvey.org/Workarounds[/url]

If you found this answer helpful and it saved you some time please consider a [url=https://donate.limesurvey.org[/url] to the...
The administrator has disabled public write access.

End Survey if a specific answer was chosen using conditions. 5 years 3 months ago #64607

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 84
  • Karma: 37
It might also be helpful to have a "carry relevance forward" command. I'm used to importing instruments from Excel, so even if there are 1000s of questions, you can drag the relevance down and re-import the survey. Short of that, a button to copy the current relevance to all down-stream questions would avoid the nuisance of having to do one at a time.
The administrator has disabled public write access.
Time to create page: 0.289 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form