Additional explanation on condition logic
In this article, we explain how conditions with AND, OR, CONTAINS, and DOES NOT CONTAIN are evaluated, and show clear examples.
1. AND condition
Rule: For
A AND Bto be TRUE, bothAandBmust be TRUE.If either one is FALSE, the whole condition is FALSE.
Examples:
"www.apple.com" CONTAINS "app"AND"www.banana.com" CONTAINS "ban"
→ TRUE AND TRUE = TRUE"www.apple.com" CONTAINS "app"AND"www.banana.com" CONTAINS "xyz"
→ TRUE AND FALSE = FALSE
2. OR condition
Rule: For
A OR Bto be TRUE, at least one ofAorBmust be TRUE.If both are FALSE, the result is FALSE.
Examples:
"www.apple.com" CONTAINS "app"OR"www.banana.com" CONTAINS "xyz"
→ TRUE OR FALSE = TRUE"www.apple.com" CONTAINS "zzz"OR"www.banana.com" CONTAINS "yyy"
→ FALSE OR FALSE = FALSE
3. CONTAINS
Rule:
X CONTAINS Yis TRUE if the text inXincludesYas a substring.case-sensitive.
Examples:
"www.strawberry.com" CONTAINS "berry"→ TRUE"www.strawberry.com" CONTAINS "Berry"→ FALSE (case mismatch)"www.strawberry.com" CONTAINS "apple"→ FALSE
4. DOES NOT CONTAIN
Rule:
X DOES NOT CONTAIN Yis the opposite of CONTAINS.It’s TRUE when
Yis not found inX.
Examples:
"www.strawberry.com" DOES NOT CONTAIN "apple"→ TRUE"www.strawberry.com" DOES NOT CONTAIN "berry"→ FALSE"www.grape.com" DOES NOT CONTAIN "ape"→ FALSE (because"ape"is inside"grape")
5. Combining CONTAINS / DOES NOT CONTAIN with AND / OR
You can chain conditions.
Examples:
"www.chocolate_cake.com" CONTAINS "cake"AND"www.chocolate_cake.com" CONTAINS "choco"
→ TRUE AND TRUE = TRUE"www.chocolate_cake.com" CONTAINS "cake"AND"www.chocolate_cake.com" DOES NOT CONTAIN "choco"
→ TRUE AND FALSE = FALSE"www.pizza.com" CONTAINS "piz"OR"www.burger.com" CONTAINS "urg"
→ TRUE OR TRUE = TRUE"www.pizza.com" DOES NOT CONTAIN "zz"OR"www.burger.com" DOES NOT CONTAIN "zzz"
→ FALSE OR TRUE = TRUE
✅ Summary Table
Condition type | Example | Result |
|---|---|---|
CONTAINS |
| TRUE |
DOES NOT CONTAIN |
| TRUE |
AND | TRUE AND FALSE | FALSE |
OR | TRUE OR FALSE | TRUE |
Combined |
| TRUE |
1. Truth Table for AND
A | B | A AND B |
|---|---|---|
TRUE | TRUE | TRUE |
TRUE | FALSE | FALSE |
FALSE | TRUE | FALSE |
FALSE | FALSE | FALSE |
👉 Both must be TRUE for the result to be TRUE.
2. Truth Table for OR
A | B | A OR B |
|---|---|---|
TRUE | TRUE | TRUE |
TRUE | FALSE | TRUE |
FALSE | TRUE | TRUE |
FALSE | FALSE | FALSE |
👉 At least one must be TRUE for the result to be TRUE.
3. Truth Table for CONTAINS / DOES NOT CONTAIN
Let’s assume text = "www.apple.com".
Condition | Result |
|---|---|
| TRUE |
| FALSE |
| FALSE |
| TRUE |
4. Combining with AND / OR
Assume the URL is www.apple.com.
Condition | A | B | Result | |
|---|---|---|---|---|
| 1 |
| TRUE | TRUE | TRUE |
| 2 |
| TRUE | FALSE | FALSE |
| 3 |
| FALSE | TRUE | TRUE |
| 4 |
| TRUE | TRUE | TRUE |
| 5 |
| FALSE | TRUE | TRUE |
| 6 |
| TRUE | TRUE | TRUE |
| 7 |
| FALSE | TRUE | FALSE |
TRUE - Form will trigger
FALSE - Form will NOT trigger
TRUE - Form will trigger
TRUE - Form will trigger
TRUE - Form will trigger
TRUE - Form will trigger
FALSE - Form will NOT trigger