A1.66 : How to set the formula with Operators (If)

A1.66 : How to set the formula with Operators (If)

Question : My Unit price is calculated using formula = d_UDF_UP * d_UDF_W * d_UDF_H. But sometimes the value of UDF is empty, it causes the Unit price becomes 0.
How can I set the Formula, so that when the value of UDF is null, it will be counted as 1

If 1.png


Answer :

Use the Operators (If) : Conditional Operator
Syntax : If (Condition, whenTrue, whenFalse)
Apply this operators ‘If’ with your UDF condition.


Formula :

if( d_UDF_UP = 0, 1, d_UDF_UP ) * if( d_UDF_W = 0, 1, d_UDF_W ) * if( d_UDF_H= 0, 1, d_UDF_H)


If 2.png


Example of the result when one of the UDF is empty in value:

If 3.png


--Source from AutoCount Wiki --