Accounting 2.0 - How to set the formula with Operators (If)

From AutoCount Resource Center

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

By : Lay Swan 190207, P190208

Go to menu

IconAcc20.PNG AutoCount Accounting 2.0

IconAcc188.PNG AutoCount Accounting 1.8 / 1.9
Wiki-Payroll.png AutoCount Payroll
Wiki-POS.PNG AutoCount POS

Wiki-AOTG.PNG AutoCount On The Go
Wiki-Accounting-Plugin.png AutoCount Accounting Plug-In Documentations