We use cookies to make this website work and to see how the website is used.
To continue browsing, select "Accept all cookies". For more information, see our Privacy notice and cookie policy.
Supported operators and functions
The operators and functions detailed here are used for conditions and formulas.
Supported operators
Operators must be used inline, for example:
-
A and B or C
-
A && B || C
-
A && B or C
-
D <> E
-
D != E
Operator | Description |
---|---|
Logical | |
and AND && |
Use to link two or more operands that must all evaluate to the defined value for the condition to be met. Not case sensitive. |
or OR || |
Use to link two or more operands, any of which must evaluate to the defined value for the condition to be met. Not case sensitive. |
= |
Equal to. |
<> != |
Not equal to. |
> |
Greater than. |
< |
Less than. |
>= |
Greater than or equal to. |
<= |
Less than or equal to. |
Numerical | |
+ |
Plus. |
- |
Minus. |
* |
Multiply. |
/ |
Divide. |
^ |
Power. |
Supported functions
Function | Description and syntax | ||||||||
---|---|---|---|---|---|---|---|---|---|
Date and Time | |||||||||
DATE |
Returns a day of the month as a number from 1 to 31 for a given date with year, month, and day values. Salesforce displays an error on the detail page if the value of the DATE function in a formula field is an invalid date, such as February 29 in a non-leapyear. DATE(year,month,day) Where:
|
||||||||
TODAY |
Returns the current day as a date data type. TODAY() |
||||||||
Informational | |||||||||
BLANKVALUE |
Determines if an expression is blank and returns a substitute expression if it is. If the expression has a value, returns the value of the expression. BLANKVALUE(expression, substitute_expression_if_blank) Where:
|
||||||||
CONTAINS |
Determines if the expression contains a value you specify. CONTAINS(expression, contains_value) Where:
|
||||||||
EVAL |
Evaluates a string and if the string represents an expression, returns the value of the expression. EVAL(string) Where:
|
||||||||
ISBLANK |
Determines if an expression is null and returns TRUE if it is. If the expression contains a value, ISBLANK returns FALSE. ISBLANK(expression) Where:
|
||||||||
NULLVALUE |
Determines if an expression is null (blank) and returns a substitute expression if it is. If the expression is not blank, returns the value of the expression. NULLVALUE does not support text fields. Use BLANKVALUE in new formulas; BLANKVALUE has the same functionality as NULLVALUE but also supports text fields. NULLVALUE(expression, substitute_expression_if_null) Where:
|
||||||||
Logical | |||||||||
IF |
Determines if expressions are true or false. Returns a given value if true and another value if false. IF(logical_test, value_if_true, value_if_false) Where:
|
||||||||
NOT |
Evaluates an expression and returns FALSE if the expression is TRUE and TRUE if the expression is FALSE. NOT(expression) Where:
|
||||||||
Math | |||||||||
MAX |
Returns the highest number from a list of numbers. MAX(number1,number2,...number_n) Where:
|
||||||||
MIN |
Returns the lowest number from a list of numbers. MIN(number1, number2,...number_n) Where:
|
||||||||
Text | |||||||||
ESCAPE |
Converts a text value to include characters compatible with HTML markup.
ESCAPE(text_string) Where:
|
||||||||
ISPICKVAL |
Determines if the value of a picklist field is equal to a text literal you specify. ISPICKVAL(picklist_field, text_literal) Where:
|
||||||||
REPLACE |
Replaces old text with new text, when old text is found in the specified source. REPLACE(text,old_text,new_text) Where:
|
||||||||
UNESCAPE |
Converts a string containing HTML markup into the text equivalent.
UNESCAPE(text_string) Where:
|