Newer Version Available
Comparison Operators
| Operator | Name | Description |
|---|---|---|
| == | Equals | Returns True if the operands are equal. String comparisons that use the equals operator are case-sensitive. |
| != | Not equals | Returns True if the operands aren’t equal. |
| < | Less than | Returns True if the left operand is less than the right operand. |
| <= | Less or equal | Returns True if the left operand is less than or equal to the right operand. |
| > | Greater than | Returns True if the left operand is greater than the right operand. |
| >= | Greater or equal | Returns True if the left operand is greater than or equal to the right operand. |
| like | Like | Returns True if the left operand contains
the string on the right. Wildcards and regular expressions aren’t supported. This
operator is case-sensitive. To match any single character in the string, include an underscore (_). To match any pattern of zero or more characters include a percent sign (%). Starting a pattern with a percent sign returns all words that are either the pattern itself or that end with it. Ending a pattern with a percent sign returns all the words that are either the pattern itself or that begin with it. To match a pattern anywhere in a string, the pattern must start and end with a percent sign. To include a literal percent sign or underscore in a pattern, you must escape them with a backwards slash (\). This query matches names such as Anita Boyle, Annie Booth, Derek Jernigan, and Hazel Jennings. This query matches names that begin with "ne" or contain "ne." These names include Andrew Levine, Annette Boone, Annette Cline, and Annie Horne. Use
with ! to exclude records. For example, the
following query shows all customer names that don’t contain
"po."
|
| matches | Matches | Returns True if the left operand contains
the string on the right. Wildcards and regular expressions aren’t supported. This
operator isn’tcase-sensitive. Single-character matches aren’t supported. For
example, the following query matches airport codes such as LAX, LAS, ALA, and BLA.
Use
with ! to exclude records. For example, the
following query shows all opportunities where Stage isn’t equal to Closed Lost or
Closed
Won:
|
| in | In | Returns True if the left operand contains
one or more of the values in the array on the right. For
example: Use the date() function to filter by date ranges. If you search for values in an empty array, in returns False. Ranges that are out of order evaluate to False. For example, ["Z" .. "A"] evaluates to False. |
| not in | Not in | Returns True if the left operand isn’t equal to any of the values in an array on the right. |