Operators used in Where String

The operators in where string are used to specify the conditions that filter out data based on certain criteria. The type of the operators and their functionality are explained.

Operator

Description

Equality ('=')

The equality operator retrieves the data where a property's value matches a specified value.
Syntax: <property> = <value>.
Example: Name = 'Input'.

Inequality ('!=' | '<>')

The inequality operator retrieves the data where a property's value does not match a specified value.
Syntax: <property> != <value> | <property> <> <value>.
Example: Name != 'Input' | Name <> 'Input'.

Less than ('<')

The less than operator retrieves the data where a property's value is less than a specified value.
Syntax: <property> < <value>.
Example: created < '2023-12-24'.

Less than or equal ('<=')

The less than or equal operator retrieves the data where a property's value is less than or equal to a specified value.
Syntax: <property> <= <value>.
Example: modified <= '2023-12-24'.

Greater than (>)

The greater than operator retrieves the data where a property's value exceeds a specified value.
Syntax: <property> > <value>.
Example: created > '2023-12-24'.

Greater than or equal ('>=')

The greater than or equal operator retrieves the data where a property's value is greater than or equal to a specified value.
Syntax: <property> >= <value>.
Example: modified >= '2023-12-24'.

Is

The Is operator is used to check whether the value of the property is of a certain type. Syntax: <property> IS <value>.
Example: Name IS system.string.

In

The In operator filters the data based on a condition that matches any value in a specified set.
Syntax: <property> In (<value1>,<value2>,<value3>).
Example: Name In ('input1', 'input2', 'input3', 'input4').

IsAssignableFrom

The IsAssignableFrom operator filters the data based on their compatibility with a certain datatype.
Syntax: <property> IsAssignableFrom <value>.
Example: Name IsAssignableFrom System.String.

Not

The Not operator is used to filter out the data that do not match the specific condition. The Not keyword is used to reverse any condition.
Syntax: NOT <condition>
Example: NOT Name = 'Input'

Like

The Like operator is used to find records based on patterns in text data. It's like a search tool that looks for specific words or phrases within a column.
Syntax: <property> Like <pattern> ; <property> ; <value>.
Like operator makes use of two wildcard characters that are "*" and "?".

  1. "*": The "*" wildcard character matches zero to more characters. It is useful when you want to match any sequence of characters regardless of length at a particular position of the string.
    Example: Name Like 'inp*' .
  2. "?": The "?" wildcard character matches exactly one character in the string. It is useful when you want to match strings based on a specific pattern where you know the structure of the string but not the exact characters.
    Example: Name Like '?nput'.

LikeX

The LikeX operator is same as Like operator it uses the same wildcard characters.
Examples: Name LikeX 'inp*' ; Name LikeX '?nput'.

And

The And operator is a logical operator used to combine multiple conditions. It retrieve the data that satisfy all of the specified conditions.
Syntax: condition1 AND condition2.
Example: Name = 'input' AND currentvalue > 100.

Or

The Or operator is a logical operator used to combine multiple conditions. It retrieves the data that satisfies at least one of the specified conditions.
Syntax: condition1 OR condition2.
Example: Name != 'input' OR currentvalue > 100.

IncludeOneOutOfRange ('<<' | '<<=' | '>>' | '>>=')

The IncludeOneOutOfRange operator ensures that one value outside the specified range is included in the result. It retrieves the data by meeting the specified condition but including one value that is out of range. Let's say we have a series of values 1,2,4,6,8 and fetch data based on values greater than or equal to 4, then the result will be 2,4,6,8. It uses a comparison operator to filter data like less than ('<<') | less than or equal ('<<=') | greater than ('>>') | greater than or equal ('>>=').
Syntax: <property> <comparison operator> <value>.
Examples:

  1. created>>'2024-05-20 09:45:00 '.
  2. created>>='2024-05-20 09:45:28'.
  3. created<<'2020-05-20 23:30:00'.
  4. created<<='2020-05-20 22:00:00'.