Filter Condition/Criteria
A Filter Condition or Filter Criteria in Salesforce is a logical expression that narrows a set of records to those matching specified rules.
Definition
A Filter Condition or Filter Criteria in Salesforce is a logical expression that narrows a set of records to those matching specified rules. The concept appears across the platform: list view filters (show only Open Cases), report filters (Opportunities closing this quarter), Flow Decision conditions, validation rules, Workflow Rule criteria, formula fields, and SOQL WHERE clauses. Each context uses slightly different syntax, but the underlying idea is the same: an expression that returns true or false for each record.
Filter conditions are foundational to almost every Salesforce automation, report, and UI customization. A condition typically references a field, an operator (equals, greater than, contains, starts with), and a value or another field. Conditions combine with AND/OR logic to express compound criteria; parentheses group nested logic. The platform evaluates conditions against each record, returning only those that match.
Where filter conditions appear in Salesforce
List view filters
List Views on object tabs (Accounts, Opportunities, Cases) use filter conditions to narrow which records appear. Typical filters: Owner = Me, Status = Open, CloseDate = LAST_30_DAYS. Multiple conditions combine with AND or with custom logic (1 AND (2 OR 3)). The platform stores list view filters as metadata.
Report filters
Reports use the same filter concept for narrowing returned records. Standard filters (date range, owner), Field Filters (Amount greater than $10K), Logic Filters (combining AND/OR), Cross Filters (Accounts with no Opportunities). Reports compose multiple filter types into a single evaluation.
Flow Decision and Get Records filters
Flow elements use filter conditions extensively. Decision elements branch based on conditions. Get Records elements fetch records matching a filter (Account where Industry = Tech). Update Records elements filter which records to modify. Each is a small filter-criteria expression.
Validation rules and entry criteria
Validation rules are filter conditions written as Boolean formulas: if the formula evaluates to true, the record fails validation. Entry criteria on Approval Processes, Process Builder, and Flow start conditions use similar Boolean logic to gate when automation runs.
SOQL WHERE clauses
Programmatic Salesforce code uses SOQL WHERE clauses for filtering. SELECT Id, Name FROM Account WHERE Industry = Technology AND BillingCountry = USA. The syntax is SQL-like, with Salesforce-specific extensions (date literals, semi-joins, anti-joins, etc.).
Formula fields and conditional logic
Formula fields can express conditional logic through IF, CASE, AND, OR functions. These are filter-style expressions evaluated at read time. Conditional formula logic powers dynamic field values based on other field states.
Common operators across all filter contexts
The operator vocabulary is consistent across Salesforce: equals, not equals, less than, greater than, less or equal, greater or equal, contains, does not contain, starts with, in (list), not in (list). Date fields support relative literals (TODAY, LAST_WEEK, LAST_N_DAYS:n). The operator set is the lingua franca of Salesforce filtering.
How to write effective filter conditions
Writing filter conditions is a core admin and developer skill. The same patterns apply across List Views, Reports, Flows, and SOQL; learn them once and reuse everywhere.
- Identify the records to narrow
Decide which object and what subset matters: Open Opportunities, Closed Cases this month, Leads with no recent activity. The business question drives the filter.
- Pick the fields and operators
Map the business question to fields and operators: Status = Open, ClosedDate = LAST_MONTH, Last_Activity_Date_c older than 90 days. Operators must match the field type.
- Build the conditions in the right tool
For List Views: open the view, click Edit Filters. For Reports: filter pane. For Flows: condition editor. For SOQL: WHERE clause. The syntax differs slightly but the logic is the same.
- Combine with AND/OR logic
Most filters AND conditions together (all must be true). Use OR when any of several conditions counts. Use custom logic with numbered conditions and parentheses for nested logic: (1 AND 2) OR (3 AND 4).
- Test with sample data
Run the filter and confirm it returns the expected records. Edge cases (null values, special characters) often surface here.
- Optimize for performance
Filter on indexed fields when possible (Id, lookup fields, Unique, External Id, fields with custom indexes). Avoid leading wildcards (LIKE %text%); the platform cannot use indexes.
Exact value comparison.
Numeric and date comparison.
Substring matching for text fields.
Multi-value match.
TODAY, LAST_WEEK, LAST_N_DAYS, THIS_QUARTER, and so on.
Direct value matching for booleans and picklists.
- Null handling varies by context. Some filters treat null as not equal; others may fail to match expected behavior. Test null cases explicitly.
- Leading wildcards in text filters disable indexing. Filters like Name LIKE %customer% scan every row; performance degrades on large tables.
- Date literal semantics differ across tools. TODAY in SOQL is the running user''s timezone; TODAY in formula functions is the org''s timezone. Mismatches cause subtle bugs.
- Complex custom logic (1 AND 2 OR 3 AND 4) without parentheses can be ambiguous. Use parentheses explicitly to make precedence clear.
Trust & references
Straight from the source - Salesforce's reference material on Filter Condition/Criteria.
- Using Filter CriteriaSalesforce Help
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is a Filter Condition?
Q2. Where do you use Filter Conditions?
Q3. Why does AND/OR logic matter?
Discussion
Loading discussion…