Destination Filter (Experimental)

Destination Filter is a new feature designed by Pio Software (version 4.26.0). You may find the capability under the Admin tab.

Screenshot 2024-12-12 at 08.20.57.png

Filter String Format

The filter string should consist of conditions and logical operators (and, or).

Conditions

A condition specifies:

  1. Field: The name of the field in the dataset you want to filter.

  2. Operator: The comparison or matching operator (e.g., eq, gt, contains).

  3. Value: The value you want to compare, enclosed in single (') or double (") quotes.

Example Condition:

displayName startsWith 'John'

Logical Operators

  1. and: Combines multiple conditions where all conditions must be true.

  2. 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

Operator

Description

Example

eq

Field is equal to the value

country eq 'US'

ne

Field is not equal to the value

status ne 'inactive'

gt

Field is greater than the value

createdAt gt '2024-01-01T00:00:00Z'

lt

Field is less than the value

age lt 30

ge

Field is greater than or equal to the value

age ge 18

le

Field is less than or equal to the value

age le 65

contains

Field contains the value (for strings)

displayName contains 'Admin'

startsWith

Field starts with the value (for strings)

displayName startsWith 'John'

endsWith

Field ends with the value (for strings)

email endsWith '@example.com'

isEmpty

Field is empty (null, undefined, or empty string)

email isEmpty

isNotEmpty

Field is not empty

email isNotEmpty


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:

Find Users in the UK or with a Display Name Containing "Jane":

Key Rules

  1. Case Sensitivity:

    • Field names and string comparisons are case-sensitive. Ensure your field names and values match the case in the dataset.

  2. Quotes:

    • Use single (') or double (") quotes to enclose values.

  3. Logical Operators:

    • You cannot mix and and or in the same filter.

  4. Empty Filter String:

    • If the filter string is empty or null, the function returns the original dataset.