INVALID_QUERY_FILTER_OPERATOR: Value is not valid for operator
What does this error mean?
Each Salesforce field type supports a specific set of SOQL comparison operators. Using an operator that doesn't apply to a field's type — such as LIKE on a Checkbox or INCLUDES on a standard picklist — produces this error. Salesforce validates operator-type compatibility at query parse time, before executing the query.
Common Causes
1. LIKE operator on a non-text field
LIKE is only valid on Text, Phone, Email, and URL fields. Using it on Number, Currency, Date, or Checkbox fields causes this error.
2. INCLUDES / EXCLUDES on a standard picklist
INCLUDES and EXCLUDES are exclusively for Multi-Select Picklist fields. Standard picklists use = or IN.
3. Passing wrong value type to =
Comparing a Boolean field with a string value (WHERE IsActive__c = 'true' instead of = true), or comparing a Date field with an incorrectly formatted string.
How to Fix It
Operator compatibility reference
| Field Type | Valid Operators |
|---|---|
| Text, Email, Phone, URL | = != < > <= >= IN NOT IN LIKE |
| Number, Currency, Percent | = != < > <= >= IN NOT IN |
| Date, Datetime | = != < > <= >= + date literals |
| Checkbox (Boolean) | = != with true / false |
| Picklist | = != IN NOT IN |
| Multi-Select Picklist | = != IN NOT IN INCLUDES EXCLUDES |
-- ❌ LIKE on Number field
WHERE AnnualRevenue LIKE '%1000%'
-- ✅ Use = or range operators on Number
WHERE AnnualRevenue > 1000
-- ❌ INCLUDES on standard Picklist
WHERE StageName INCLUDES ('Closed Won')
-- ✅ Use IN for standard Picklist
WHERE StageName IN ('Closed Won', 'Closed Lost')
-- ✅ INCLUDES is correct for Multi-Select Picklist
WHERE Multi_Select__c INCLUDES ('Option A', 'Option B')