Logical AND: All sub-expressions must be true.
Used in AndOrExpression to require all conditions to match.
Text operator: Property begins with value.
Matches objects where the text property starts with the specified value. The operator already decides where the value has to appear, so pass the fragment on its own rather than a pattern.
Text operator: Property ends with value.
Matches objects where the text property ends with the specified value. The operator already decides where the value has to appear, so pass the fragment on its own rather than a pattern.
Equality operator: Property equals value.
Matches objects where the property equals the specified value. Works with strings, numbers, booleans, and null.
When the web client evaluates the filter and the property holds several values, such as a relation, the comparison matches if any one of them equals the value.
Greater than operator: Property is greater than value.
Matches objects where the property value is strictly greater than the specified value. Works with numbers and with dates.
Greater than or equal operator: Property is greater than or equal to value.
Matches objects where the property value is greater than or equal to the specified value.
Membership operator: Property matches any value in a list or filter.
Used in InExpression to check if property equals any value in an array, or in InFilterExpression to check against results from a saved filter. Each value in the list is compared the same way Operator.EQUALS compares one.
import {
InExpression,
InFilterExpression,
Operator,
} from '@limetech/lime-web-components';
const inValueList: InExpression = {
key: 'status',
op: Operator.IN,
exp: ['open', 'in_progress', 'waiting'],
};
const inFilterResult: InFilterExpression = {
type: 'filter',
key: 'owner',
op: Operator.IN,
exp: 'sales_team_filter',
};
Less than operator: Property is less than value.
Matches objects where the property value is strictly less than the specified value. Works with numbers and with dates.
Less than or equal operator: Property is less than or equal to value.
Matches objects where the property value is less than or equal to the specified value.
Text operator: Property contains value.
Matches objects where the text property contains the specified value anywhere in the string. The operator already decides where the value has to appear, so pass the fragment on its own rather than a pattern.
Logical NOT: Inverts the result of an expression.
Used in NotExpression to exclude matching objects. The exp must
be another expression. To negate a single comparison, use
Operator.NOT_EQUALS rather than wrapping it in a NOT.
Inequality operator: Property does not equal value.
Matches objects where the property is not equal to the specified value.
Logical OR: At least one sub-expression must be true.
Used in AndOrExpression to match if any condition is true.
Operators for building filter expressions in Lime CRM queries.
The Operator enum defines all available operators for constructing Expressions. Operators are divided into four categories:
=,!=,<,>,<=,>=)The same operators are used in filters the server evaluates, such as Query.filter and LoadOptions.filter, and in filters the web client evaluates locally against an object it has already loaded. The two do not compare text the same way. The client ignores case, while the server compares as the database does. Treat case sensitivity as unspecified and do not build logic that depends on it.
Each operator carries its own example below. This one shows what a single member cannot, how the categories combine into one filter.
Example: Complex real-world example, find high-priority open deals
See