Complex Logic with lots of conditions | Community
Skip to main content
Question

Complex Logic with lots of conditions

  • May 30, 2025
  • 1 reply
  • 22 views

Background

I am creating a complex application form whose initial questions will weed out those who are not eligible. The issue is that we offer many different services, each with different specific criteria, and applicants can choose more than one service. 

The flow of my form is as follows:

  1. Ask some criteria information
  2. Ask what service(s) they are interested in
  3. Ask questions common to all services
  4. Ask specific questions based on the services they have chosen and are eligible for

Firstly, is this possible from Typeform?

 

More information

I am currently work on steps 1. and 2. and these are the conditions for my services:

[Note table shows a lot of information not necessary for this specific question]. 

 
Q5 Interest in what service ===> Service A Service B Service C Service D Service E Service F
Q2. Residency (single selection)            
R Option 1 Y Y Y Y Y Y
R Option 2 Y Y N Y Y Y
R Option 3 Y Y N Y Y Y
R Option 4 N Y N Y Y N
R Option 5 N N N Y Y N
R Option 6 N N N Y Y Y
R Option 7 N N N Y Y N
R Option 8 N N N Y N N
Q3. Criteria (multiple selection)       is not is not  
C Option 1 o Y Y o o o
C Option 2 o o o o Y o
C Option 3 o o o o Y o
C Option 4 o o o o o Y
C Option 5 o o o o o Y
C Option 6 o o o o o Y
C Option 7 o o o Y Y o
C Option 8 o o o o o o
Q4. Hospital (single selection)            
H Option 1 o Y o o o o
H Option 2 o Y o o o o
H Option 3 o Y o o o o
H Option 4 o N o o o o
H Option 5 o Y o o o o
H Option 6 o N o o o o

 

Where,

Y = they need to meet at least one of those criteria

N = if they meet this criteria, then they are not eligible (only applies to single selection)

o = it has no effect on eligibility

 

What I have tried

A section of my logic so far is:

 

Q5. Interest in what service

IS Service B 

AND

Q2. Residency

IS R Option 5 

OR

IS R Option 6 

OR

IS R Option 7 

AND

Q4. Hospital

IS H Option 5 

OR

IS H Option 7

Then Go To “Sorry, you are not eligible”

 

In all other cases, then it should continue to the next question. 

 

The problem

I have replicated the same condition structure above for other services. But when I test it, I am initially just doing it based on one single condition = R Option 1 → C option 1 → H Option 1. This person should immediately be eligible but it takes me to the “Sorry, you are not eligible” End Screen. 

What is the problem? Is this because of how I am using the AND and OR conditions? Will I need to create conditions for all the permutations that may come from choosing each service + each combination of multiple services? Is there a workaround?

jvh
Typeform
Forum|alt.badge.img+5
  • Typeform
  • June 3, 2025

Hi there,

My assumption is that the `AND` and `OR` isn’t quite working how you’re expecting it to. I think you’d need to add a separate rule for every possible combination so that the logic understands which combination of answers results in a certain outcome.

Which would look something like this:

 

Rule #1

IF Q5. Interest in what service

IS Service B 

AND

Q2. Residency

IS R Option 5 

AND

Q4. Hospital

IS H Option 5 👈

Then Go To “Sorry, you are not eligible”

 

Rule #2

IF Q5. Interest in what service

IS Service B 

AND

Q2. Residency

IS R Option 5 

AND

Q4. Hospital

IS H Option 7 👈

Then Go To “Sorry, you are not eligible”

 

Rule #3

IF Q5. Interest in what service

IS Service B 

AND

Q2. Residency

IS R Option 6 👈

AND

Q4. Hospital

IS H Option 5

Then Go To “Sorry, you are not eligible”

 

Rule #4

IF Q5. Interest in what service

IS Service B 

AND

Q2. Residency

IS R Option 6 👈

AND

Q4. Hospital

IS H Option 7 👈

Then Go To “Sorry, you are not eligible”

 

and so on. Does that make sense? It’s definitely a bit of a time consuming task depending on the size of your form 😬

Let me know if that works or if anything is unclear :)

Joyce


Reply