Filter String Format
The filter string should consist of conditions and logical operators (and
, or
).
Conditions
A condition specifies:
Field: The name of the field in the dataset you want to filter.
Operator: The comparison or matching operator (e.g.,
eq
,gt
,contains
).Value: The value you want to compare, enclosed in single (
'
) or double ("
) quotes.
Example Condition:
displayName startsWith 'John'
Logical Operators
and
: Combines multiple conditions where all conditions must be true.or
: Combines multiple conditions where at least one condition must be true.
Note: You can use either and
or or
in a single filter but not both at the same time.
Supported Operators
Operator | Description | Example |
---|---|---|
| Field is equal to the value |
|
| Field is not equal to the value |
|
| Field is greater than the value |
|
| Field is less than the value |
|
| Field is greater than or equal to the value |
|
| Field is less than or equal to the value |
|
| Field contains the value (for strings) |
|
| Field starts with the value (for strings) |
|
| Field ends with the value (for strings) |
|
Examples
Find Users Whose Display Name Starts with "John":
displayName startsWith 'John'
Find Active Users in the US:
status eq 'active' and country eq 'US'
Find Users Created After a Specific Date:
createdAt gt '2024-01-01T00:00:00Z'
Find Users in the UK or with a Display Name Containing "Jane":
country eq 'UK' or displayName contains 'Jane'
Key Rules
Case Sensitivity:
Field names and string comparisons are case-sensitive. Ensure your field names and values match the case in the dataset.
Quotes:
Use single (
'
) or double ("
) quotes to enclose values.
Logical Operators:
You cannot mix
and
andor
in the same filter.
Empty Filter String:
If the filter string is empty or
null
, the function returns the original dataset.