Operators in filter templates

Last Updated : Sep 14, 2022 |
The following table provides the list of operators that are available in the filter templates. You can use these operators to build filter conditions in the filter templates. The operators that are available for a contact attribute depend on the data type of the contact attribute.
Prolog information
Data type of the contact attribute
Operator
  • Integer
  • Short
  • Long
  • Float
  • =
  • !=
  • >=
  • <=
  • >
  • <
  • in
  • not in
  • between
  • not between
  • isNull
  • is not null
  • String
  • Character
  • Email
  • Phone
  • =
  • !=
  • in
  • not in
  • like
  • not like
  • isNull
  • is not null
Boolean
  • =
  • !=
  • isNull
  • is not null
Based on the database configuration, the functioning of the like and not like operators are case-sensitive or case-insensitive.
For example, if your database configuration is case-sensitive, string such as 'A%' matches with 'Abc' and not with 'abc'. If your database configuration is case-insensitive, string such as 'A%' matches with both 'Abc' and 'abc'.
Contact attributes with null value are not selected when the not in operator is used.

Support for $NOW and $TODAY in a filter template

$TODAY is supported for date type of contact attributes and $NOW is supported for timestamp type of contact attributes.
$NOW and $TODAY also support specifying offsets such as $NOW plus (+) or minus (-) offset_value, and $TODAY plus (+) or minus (-) offset_value.
For example, $NOW+3 for a timestamp data type represents current time plus 3 hours. $NOW-3 represents current time minus 3 hours. Similarly, $TODAY+1 for a date data type represents current date plus 1 day.