Logical
1. ISBLANK
Analyzes the given expression and returns:
With one argument: boolean value (true if argument expression does not have a value (is empty or does not exist), otherwise returns false).
With 2 arguments: some expression evaluation result or first argument value.
With 3 arguments: some expression evaluation result or some other expression evaluation result.
ISBLANK(parameter1) or
ISBLANK(parameter1, if_true_parameter2) or
ISBLANK(parameter1, if_true_parameter2, if_false_parameter3)
Replace:
parameter1 with logical expression you want to evaluate;
if_true_parameter2 with the result you want to get when parameter1 returns true;
if_false_parameter3 with the result you want to get when parameter1 returns false.
ISBLANK({$Variables.someDate}) will return true if variable someDate value is empty (or this variable does not exist at all), and false if it has a value.
ISBLANK({$Variables.someDate}, '{$System.date}') will return current system date if variable someDate value is empty (or this variable does not exist at all), and a value of this variable in other case.
ISBLANK({$Variables.someDate}, '{$System.date}', '{Opportunity.closeDate}') will return current system date if variable someDate value is empty (or this variable does not exist at all), and value of Opportunity.closeDate field if variable has a value.
2. NOT
Returns false for TRUE and true for FALSE (inverts result of logical expression).
NOT(parameter)
Replace parameter with a logical expression that you want to evaluate.
NOT(CONTAINS({Opportunity.Product_Type__c}, 'part')) will return true if Product Type value contains 'part' string and false if it doesn't.
3. IF
Determines if condition expression is true or false. Returns a given value if true and another value if false.
IF(condition, result_if_true, result_if_false)
Replace:
condition with with the logical expression,
result_if_true with the result you want to get if the condition is true,
result_if_false with the result you want to get if the condition is false.
IF({Opportunity.Items_Number__c} > 0, 'In Progress', 'Pending') will return 'In Progress' if number of items is more than 0, and 'Pending' in other case.
4. AND
Returns boolean value: true if all parameter values are true, and false if one or more values are false.
AND(boolean_parameter1, boolean_parameter2, ...)
Replace boolean_parameter1, boolean_parameter2, etc with values or expressions that you want evaluated.
AND({Contact.Migrated__c} = 'Yes', {Contact.Trusted__c} = 'Yes') will return true if both Contact Migrated and Contact Trusted values are equal to 'Yes'. Otherwise it will return false.
5. OR
Returns boolean value: true if at least one parameter is true, and false if all paramaters are false.
OR(boolean_parameter1, boolean_parameter2, ...)
Replace boolean_parameter1, boolean_parameter2, etc with values or expressions you want evaluated.
OR({$Variables.Exhibition_month__c} = 'MAR', {Partner__c.Exhibition_month__c} = 'APR', {Partner__c.Exhibition_month__c} = 'MAY') - this formula will return true if Exhibition_month__c is set to any spring month, and false if it is set to any other value.
6. CASE
Checks given expression value against series of case values. If the expression is equal to one of the case values, returns the corresponding result.
CASE(value, case1, result1, case2, result2, ..., else_result)
Replace:
value with the field or value you want compared to each specified case;
each case (case1, case2, etc.) with the data/expression/field for comparison;
each result (result1, result2, etc.) with data/expression/field that must be returned for the proper case;
else_result with the data/expression/field that must be returned when the expression does not equal to any case.
Let String__c = 'Plane'.
CASE({Stub__c.String__c}, 'Car' , 'drive', 'Plane', 'fly', 'Boat', 'sail', 'none') will return 'fly'.
7. IN
Returns boolean (true or false) result depending on whether checked value is present in given list.
IN(value, list_of_values OR [value1, value2, ...])
Replace:
value with value you need to check in list;
list_of_values with the list to compare value parameter to (or pass list of values as separate parameters value1, value2, etc).
IN({Opportunity.Stage}, 'Lost', 'Won', 'Review', 'Needs Analysis') returns true if Opportunity.Stage field value is present in the given set of strings ('Lost', 'Won', 'Review', 'Needs Analysis') and false if it is not.
Let Stub__c.String__c = '["YESTERDAY", "NOW", "TOMORROW"]'.
IN('NOW', JPARSE({Stub__c.String__c})) will return true.
Let Stub__c.String__c = '["YESTERDAY", "NOW", "TOMORROW"]' and Stub__c.Area__c = 'NEXT YEAR'.
IN('NEXT YEAR', JPARSE({Stub__c.String__c}), {Stub__c.Area__c}, 'PREVIOUS YEAR') will return true.
8. NOTIN
Returns boolean (true or false) result depending on whether checked value is NOT present in given list.
NOTIN(value, list_of_values OR [value1, value2, ...])
Replace:
value with value you need to check in list;
list_of_values with the list to compare value parameter to (or pass list of values as separate parameters value1, value2, etc).
NOTIN({Opportunity.Stage}, 'Lost', 'Won', 'Review', 'Needs Analysis') returns true if Opportunity.Stage field value is not present in the given set of strings ('Lost', 'Won', 'Review', 'Needs Analysis') and false if it is present there.
Let Stub__c.String__c = '["YESTERDAY", "NOW", "TOMORROW"]'.
NOTIN('NOW', JPARSE({Stub__c.String__c})) will return false.
Let Stub__c.String__c = '["YESTERDAY", "NOW", "TOMORROW"]' and Stub__c.Area__c = 'NEXT YEAR'.
IN('NEXT MONTH', JPARSE({Stub__c.String__c}), {Stub__c.Area__c}, 'PREVIOUS YEAR') will return true.
9. INSTANCEOF
Validates if specified value is an instance of a declared type. Returns boolean result (true or false).
INSTANCEOF(value, Decimal|Boolean|String|Date|DateTime)
Replace value argument with a value you want to validate and pass one of the allowed types (Decimal, Boolean, String, Date or DateTime) as second argument.
INSTANCEOF({$Variables.Result}, Decimal) will return true if variable "Result" is a number, and false if it is not.
Last updated