Action event conditions: valid content

Understand valid content for action event conditions in Sage.

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

Logical operators

Operator Description

and

AND 

&&

Use to link two or more operands that must all evaluate to the value you define to meet the condition.

Not case sensitive.

or

OR

||

Use to link two or more operands, any of which must evaluate to the value you define to meet the condition.

Not case sensitive.

=

Equals.

NOT

<>

!=

Not equal.

>

Greater than.

<

Less than.

>=

Greater than or equal to.

<=

Less than or equal to.

Tip

Use AND for &&, OR for ||, and NOT for != to reduce the likelihood of parsing errors in your conditions.

Numerical operators

Operator Description
+

Plus.

-

Minus.

*

Multiply.

/

Divide.

^

Power.

Supported functions

Date and time functions

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. For example, February 29 in a non-leapyear.

DATE(year,month,day)

Where:

  • year is a four-digit year

  • month is a two-digit month

  • day is a two-digit day

TODAY

Returns the current day as a date data type.

TODAY()

Informational functions

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:

  • expression is the expression you want to evaluate

  • substitute_expression_if_blank is the value you want to replace any blank values

EVAL

Evaluates a string and if the string represents an expression, returns the value of the expression.

EVAL(string)

Where:

  • string is the character string you want to evaluate

ISBLANK

Determines if an expression has a value and returns TRUE if it doesn't. If it contains a value, this function returns FALSE.

ISBLANK(expression)

Where:

  • expression is the expression you want to evaluate

ISNULL

Determines if an expression is null and returns TRUE if it is. If the expression contains a value, ISNULL returns FALSE.

ISNULL(expression)

Where:

  • expression is the expression you want to evaluate

NULLVALUE

Determines if an expression is null (blank) and returns a substitute expression if it is. If the expression isn't blank, returns the value of the expression.

NULLVALUE doesn't 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:

  • expression is the expression you want to evaluate

  • substitute_expression_if_null is the value you want to replace any blank values

Logical functions

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:

  • logical_test is the expression you want to evaluate

  • value_if_true is the value you want the system to return if the expression is true

  • value_if_false is the value you want the system to return if the expression is false

NOT

Evaluates an expression and returns FALSE if the expression is TRUE and TRUE if the expression is FALSE.

NOT(expression)

Where:

  • expression is the expression you want to evaluate

Math functions

Returns the highest number from a list of numbers.

MAX(number1,number2,...number_n)

Where:

  • number1, number2,...number_n are the fields or expressions you want evaluating to retrieve the highest number

MIN

Returns the lowest number from a list of numbers.

MIN(number1, number2,...number_n)

Where:

  • number1, number2,...number_n are the fields or expressions you want evaluating to retrieve the lowest number

Text functions

ESCAPE

Converts a text value to include characters compatible with HTML markup.

Replaces... With...
& &amp:
< &lt;
> &gt;

ESCAPE(text_string)

Where:

  • text_string is the text you want to escape to HTML markup

ISCHANGED

Compares the value of a field to its previous value, and returns true if the values are different.

ISCHANGED(field)

Where:

  • field is the API name of the field you want to query

ISPICKVAL

Determines if the value of a picklist field is equal to a text literal you specify.

ISPICKVAL(picklist_field, text_literal)

Where:

  • picklist_field is the merge field name for the picklist

  • text_literal is the picklist value in quotes. text_literal can't be a merge field or the result of a function

REPLACE

Replaces old text with new text, when old text is found in the specified source.

REPLACE(text,old_text,new_text)

Where:

  • text is the field or expression you want to search for the text you want to replace

  • old_text is the string you want to find and replace

  • new_text is the text you want to use to replace old_text in text

UNESCAPE

Converts a string containing HTML markup into the text equivalent.

Replaces... With...
&amp; &
&lt; <
&gt; >

UNESCAPE(text_string)

Where:

  • text_string is the text you want to escape from HTML markup