🔀 Module 13: Search Logic (AND/OR/NOT)

Week 3 • Saved Searches Advanced • Core Skills

Understanding Search Logic

By default, all criteria in a saved search are combined with AND logic — meaning all conditions must be true for a record to appear. To create more complex filters, you can use OR and NOT logic with the "Use Expressions" feature.

Logic Operators

AND Logic (Default)

All conditions must be true. Records must match every criterion.

Status = Open AND Amount > 1000 AND Type = Invoice

Result: Only invoices that are open AND have amount > 1000

OR Logic

At least one condition must be true. Records match any of the criteria.

Status = Open OR Status = Pending

Result: All records that are open OR pending

NOT Logic

Excludes records matching the condition.

Type = Invoice AND NOT Status = Paid

Result: All invoices except those that are paid

Using Expressions

📍 Enable Expressions

  1. On the Criteria subtab, check "Use Expressions"
  2. Each filter row gets a number (1, 2, 3...)
  3. Build your expression using numbers and operators
  4. Use parentheses to group conditions

💡 Expression Examples

Simple AND: 1 AND 2 AND 3

Simple OR: 1 OR 2 OR 3

Mixed: 1 AND (2 OR 3)

Complex: (1 AND 2) OR (3 AND 4)

With NOT: 1 AND 2 AND NOT 3

Practical Example

💡 Find High-Value Open or Overdue Invoices

Criteria:

  1. Type = Invoice
  2. Amount > 5000
  3. Status = Open
  4. Status = Overdue

Expression:

1 AND 2 AND (3 OR 4)

Result: All invoices over $5,000 that are either open or overdue.

💡 Pro Tip: Parentheses Matter

Without parentheses, expressions are evaluated left to right. Always use parentheses to ensure your logic is processed correctly:

1 AND 2 OR 3 → May give unexpected results
1 AND (2 OR 3) → Explicit grouping, predictable results

🎯 Key Takeaways