# TOPIC: Creating a Condition that requires a mixture of ANDs and ORs

## Creating a Condition that requires a mixture of ANDs and ORs 3 years 10 months ago #71963

 guelphpeter Offline Junior Lime Posts: 36 Thank you received: 1 Karma: 0 Sorry for what well may be a newbie question but this one has me baffled and I'd be grateful for any help please. I'm sure the answer is to use "scenarios" but I'm stumped on how to do it. Can anyone show me how to make this condition for a question please ? Only show this question if: Quest_1 = "yes" AND Quest_2 = "yes" AND ( Quest_3 = "yes" OR Quest_4 = "yes" OR Quest_5 = "yes" ) Thanks in advance for any help, Peter McCaskelll University of Guelph Guelph, Ontario, Canada The administrator has disabled public write access.

## Creating a Condition that requires a mixture of ANDs and ORs 3 years 10 months ago #71966

 guelphpeter Offline Junior Lime Posts: 36 Thank you received: 1 Karma: 0 Hi again everyone. I finally figured my question (above) out so I wanted to withdraw the request. For those interested, the solution is to make three scenarios: Scenario 1 is: Quest_1 = "yes" AND Quest_2 = "yes" AND Quest_3 = "yes" Scearnio 2 is: Quest_1 = "yes" AND Quest_2 = "yes" AND Quest_4 = "yes" Scearnio 3 is: Quest_1 = "yes" AND Quest_2 = "yes" AND Quest_5 = "yes" Because the scenarios get "Or'd" together they do what I needed which was: Quest_1 = "yes" AND Quest_2 = "yes" AND ( Quest_3 = "yes" OR Quest_4 = "yes" OR Quest_5 = "yes" ) I hope the above may be helpful to someone - it's simple once the lightbulb finally came on over my head The administrator has disabled public write access.

## Creating a Condition that requires a mixture of ANDs and ORs 3 years 10 months ago #71967

 TMSWhite Offline LimeSurvey Team Posts: 759 Thank you received: 83 Karma: 37 guelphpeter- In LS 1.92 RC2, you can do the following. For brevity, I'll name your questions Q1-Q5. Set the relevance equation for the question to this: `Q1=='Y' and Q2=='Y' and (Q3=='Y' or Q4=='Y' or Q5=='Y')` where Q1-Q5 are the actual names of the questions, not the SGQA codes. /Tom If you depend upon LimeSurvey or the support team, please give generously to our 2012 fundraiser. Expression Manager (EM): Documentation | Sample Surveys | How Tos | Show Logic File | Upgrading to 1.92+ Excel Style for Survey Structure Import/Export Last Edit: 3 years 10 months ago by TMSWhite. The administrator has disabled public write access.

## Creating a Condition that requires a mixture of ANDs and ORs 3 years 10 months ago #71968

 guelphpeter Offline Junior Lime Posts: 36 Thank you received: 1 Karma: 0 Thanks as always for your help Tom - really appreciated ! Looking forward to having a look at version 1.92 ! Peter The administrator has disabled public write access.

## Creating a Condition that requires a mixture of ANDs and ORs 3 years 10 months ago #72003

 Mazi Offline LimeSurvey Team Posts: 5810 Thank you received: 345 Karma: 261 Thanks for sharing your findings! Best regards/Beste Grüße, Dr. Marcel Minke (Limesurvey Head of Support) Need Help? We offer professional Limesurvey support Contact: marcel.minke(at)limesurvey.org'" The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.154 seconds