Hello @doradvokat
Thank you very much for using our plugin.
The equations are entered through the “Set equation” attribute in the calculated fields, and the PREC operation must be the outermost operation in the equation.
If you have a simple equation like fieldname1*fieldname2 and want the result with four decimals, the proces is straightforward:
PREC(fieldname1*fieldname2, 4, true)
However, in complex equations the process could not be evident.
For example, in te equation:
(function(){
if(fieldname1 < fieldname2) return fieldname1 * fieldname2;
else return fieldname1/fieldname2;
})()
In this case, there are two last operations in the equation, the return instructions. So, you must call the PREC operation in both.
(function(){
if(fieldname1 < fieldname2) return PREC(fieldname1 * fieldname2, 4, true);
else return PREC(fieldname1/fieldname2, 4, true);
})()
Best regards.