Using Formula Conditions
- Select Formula condition type.
- Select Context Object and Item and insert to your formula section. Combining different context objects and context object items create formula expression.
See more on using Context Object at Working with Context objects. See more on using Functions in formula at Using Functions.
Formula type condition operators
Following operators can be used when creating logic for Formula condition type:
-
||
evaluates if at least one of multiple values or expressions is true. Use this operator as an alternative to the logical function OR. -
&&
evaluates if two values or expressions are both true. Use this operator as an alternative to the logical function AND. -
<=
evaluates if a value is less than or equal to the value that follows this symbol. -
>=
evaluates if a value is greater than or equal to the value that follows this symbol. -
>
evaluates if a value is greater than the value that follows this symbol. -
<
evaluates if a value is less than the value that follows this symbol -
!=
evaluates if two values are not equivalent -
=
evaluates if two values are equivalent -
+
calculates the sum of two values. -
-
calculates the difference of two values. -
*
Multiplies its values. -
/
Divides its values. -
(
and)
Specify that the expressions within the open parenthesis and close parenthesis are evaluated first. All other expressions are evaluated using standard operator precedence.
Example:
Following formula condition will be met if Opportunity Name starts with 'Thompson & Co.', Stage is not Closed/Lost or Closed/Won and Probability value equals to or greater than 80%.
Andrew
I need to add months to a date depending on the value in another field. I understand in order to add months I would use a formula similar to - FORMULA[ADDMONTHS({Subscription_Product__c.SEO_Maintenance_Date__c},1)], however I need to extend this to use IF statements if possible. So if product ID = 100, add 1 month, if product ID = 200, add 2 months and so on. Is this possible?
Work-Relay Administrator
Hi Andrew!
You can use CASE function to cover your requirement: FORMULA[ADDMONTHS({Subscription_Product__c.SEO_Maintenance_Date__c}, CASE({Product_Id__c}, 100, 1, 200, 2, 300, 3, 400, 4, [other months comparison here], 0))] . Above formula will add 1 month to Maintenance Date if Product Id is 100, 2 months if it is 200 ect.
Andrew
Is there a symbol for an alternative to the logic of contains or like. e.g field x contains 'xyz'
Work-Relay Administrator
Hi Andrew!
There's no special symbol for 'contains' logic.
You can use CONTAINS() function for that - https://w-r.screenstepslive.com/s/12930/m/64195/l/672187-using-functions#contains