Application Filter

How to Use the Filter

The Filter enables users to filter a dataset based on a human-readable filter string. This tool allows for dynamic and complex filtering by specifying conditions and logical operators like and and or.

Here’s a guide on how to use this function, focusing on fields like displayName, version, publisher, platform, deviceCount, sizeInByte, id, and application_url.


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 (e.g., displayName, platform).

  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:

platform eq 'iOS'

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

Checks if a field is equal to the specified value

platform eq 'iOS'

ne

Checks if a field is not equal to the specified value

publisher ne 'Microsoft'

gt

Checks if a field is greater than the specified value

deviceCount gt 10

lt

Checks if a field is less than the specified value

sizeInByte lt 500000

ge

Checks if a field is greater than or equal to the specified value

deviceCount ge 20

le

Checks if a field is less than or equal to the specified value

sizeInByte le 1000000

contains

Checks if a field contains the specified value (for strings)

displayName contains 'App'

startsWith

Checks if a field starts with the specified value (for strings)

publisher startsWith 'Apple'

endsWith

Checks if a field ends with the specified value (for strings)

application_url endsWith '.com'

isEmpty

Checks if a field is empty (null, undefined, or an empty string)

displayName isEmpty

isNotEmpty

Checks if a field is not empty

displayName isNotEmpty


Examples

Find Applications Published by "Apple":

publisher eq 'Apple'

Find Applications with Device Count Greater Than 50:

deviceCount gt 50

Find Applications for iOS and Published by Microsoft:

Find Applications Hosted on .com URLs:

Find Applications Larger Than 1MB or Running on Android:

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.