Limiting the Number of Decimal Places in Formula Calculations

When developing complex formulas in Ocean eForms, you may find yourself with a large number of decimal places (e.g., 2.342456677543). In order to limit the number, you can use a simple add on at the end of your formula - .toFixed(#) - where # is the desired number of decimal places. 

For example:

Original formula: 

  • (( (6 - q1.p) + (6 - q2.p) + (q3.p) ) / 3)
  • This formula would result in an answer such a 2.666667
 

Revised formula: 

  • (( (6 - q1.p) + (6 - q2.p) + (q3.p) ) / 3).toFixed(2)
  • This formula would result in an answer such as 2.67
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request