Filter template operators

Last Updated : Jul 13, 2022 |
Prolog information
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.
Attribute type
Allowed operators
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 notlike operators are case-sensitive for the inputs entered.
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, then 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 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.

Support for filtering based on wildcard characters (same as regular expression) for LIKE and NOT LIKE operators

Wildcard character-based filtering is available only for string type of attributes. You can use Java wildcard characters for filtering with file splitter type of filter template. For example, to search FirstName:
  • Starting with character L, you can specify “^L” or “L.*”
  • Containing “ra”, you can specify “.*ra.*”
  • With more than 6 characters, you can specify “…….*”
  • Ending with ‘n’, you can specify “.*n$”