Multiple formula’s can be used in IDCA total fields. Here we will look at multiple conditional formulas in same field of IDCA. This article will cover syntax to apply multiple independent conditional formulas in the same field as and when required. This can help in many ways. For example. a field may be depending upon multiple independent conditions to produce the result. For this, you can use this feature to customize a field by adding multiple independent conditions in the same field with any arithmetic operator in between as required.
IF{(Condition 1),Value If True,Value If False} Operator IF{(Condition 2),Value If True,Value If False} …
Here,
Condition 1, Condition 2 : The multiple criteria,
Values if True : Respective values in case above said conditions are met,
Values if False : Respective values in case above said conditions are not met,
Operator: Relation between the multiple conditions.
Add the following in the formula section of any field
IF{(SUM($net_price$)>=20),2,1}Â +Â 2Â +Â IF{(SUM($net_price$)>=30),2,1}Â +Â 2
Condition 1:Â IF{(SUM($net_price$)>=20),2,1}
Condition 2:Â IF{(SUM($net_price$)>=30),2,1}
Operator :Â +
Constants: 2
This multiple conditional formula will evaluate the expression from left to right and will evaluate the expression in the following order:
(Result of Condition 1) + 2Â + (Result of Condition 2) + 2
Condition 1: True (Value =2)
Condition 2: True (Value=2)
Result = 2 + 2 + 2 + 2 = 8
2. Suppose Net Price = $25
Condition 1: True (Value =2)
Condition 2: False (Value=1)
Result = 2 + 2 + 1 + 2 = 7
3. Suppose Net Price = $10
Condition 1: False (Value =1)
Condition 2: False (Value=1)
Result = 1 + 2 + 1 + 2 = 6
4. Suppose Net Price = $20
Condition 1: True (Value =2)
Condition 2: False (Value=1)
Result = 2 + 2 + 1 + 2 = 7
5. Suppose Net Price = $1000
Condition 1: True (Value =2)
Condition 2: True (Value=2)
Result = 2 + 2 + 2 + 2 = 8
Above said examples have been defined using complex formulas. Complex formulas are the formulas defined with multiple arithmetic operators (<,>,=,!=) at the same time.
Complex formula is intended to be used to calculate and analyze numerical information such as net income, invoices, sales order, purchase order and inventory. To do this, you can customize the formula yourself or use pre-define formula which will help you to calculate your invoices. Complex formulas that use multiple mathematical operators, as well as those that use absolute and relative references. Complex formulas involve more than one mathematical operation.
The order of mathematical operations is important. If you enter a formula that contains several operations. It automatically follows a standard order of operations in a complex formula. If you want a certain portion of the formula to be calculated first, put it in parentheses. It works in the following way
This is how a user can use multiple conditional formulas in same field of IDCA
Next Article: Currency Management in Vtiger CRM