Difference between revisions of "Operators in Formula Expressions"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
 
Line 3: Line 3:


:Expressions are used in [[Formula Fields]], as:
:Expressions are used in [[Formula Fields]], as:
:*[[Data_Policy#About_Policy_Triggering_Criteria|Triggering Criteria]] in Data Policies
:*[[Validations]]
:*[[Validations]]
:*Formulas in [[Computed Fields]]
:*Formulas in [[Computed Fields]]

Latest revision as of 02:06, 12 January 2013

Operators are used with Fields and values to create Expressions.

Expressions are used in Formula Fields, as:
Available operators are:
Operator Name Description Examples
!= Not Equal Evaluates if two numbers/strings/boolean values are not equal in value, and returns TRUE if the numbers/strings/boolean values are not equal Is the listed price not equal to $100?
Listed_Price != $100
&& Logical AND Compares two Logical Boolean expressions, and returns TRUE if both conditions are TRUE Is the total amount greater than $10,000 and the requested delivery date in the future?
total_amount > 10000 && delivery_date > TODAY (NOW())
> Greater Than Evaluates if a number is greater than another number, and returns TRUE if the condition is met Are sales greater than the quota of $10,000/month?
Quota> 10000
>= Greater Than or Equal To Evaluates if a number is greater than or equal to another number, and returns TRUE if the condition is met Are sales greater than or equal to the quota of $10,000/month?
Quota>= 10000
< Less Than Evaluates if a number is less than another number, and returns TRUE if the condition is met Are sales less than the quota of $10,000/month?
Quota< 10000
<= Less Than or Equal To Evaluates if a number is less than or equal to another number, and returns TRUE if the condition is met Are sales less than or equal to the quota of $10,000/month?
Quota<= 10000
( ) Parentheses or Brackets Creates groups of expressions

Evaluates the expressions between the open and closed brackets before evaluating the parts of the expression outside of the brackets

Multiply the price by the number of units, then apply a discount to the resulting value
(Number_of_Units * Price) - Discount
* Multiply Multiplies two numbers Multiply the total amount due by a discount amount
Total_Due * Discount_%
+ Plus or Concatenate

Has two functions:

  1. Calculates the sum of two numbers
  2. Joins multiple text strings into one text string
  1. Returns the sum of the tax and shipping:
    (SubTotal * Tax) + Shipping
  2. Creates a value formatted for Sorting (by last name)
    LASTNAME + ', ' + FIRSTNAME
- Minus Calculates the difference between two numbers Calculate the number of units yet to be delivered
Quantity_Ordered - Quantity_Received
/ Divide Divides a number by another number Divide a yearly sales quota by 12 to find a monthly quota amount
Quota/ 12
= Equal Evaluates if two numbers are equal in value, and returns TRUE if the condition is met Is the price equal to $100?
Price=$100
|| Logical OR Compares two Logical Boolean expressions, and returns:
  • TRUE if either of the conditions are TRUE
Is the total amount is greater than $10,000, or is the requested delivery date in the future?
total_amount > 10000 || delivery_date > TODAY (NOW())