Rounding to 2 decimal places ONLY
I have a form in which I am using the below custom calculation script:
// Acquire Inputs
var nA = Number(this.getField("Yes1").valueAsString);
var nB = Number(this.getField("TotalOSAudited").valueAsString);
var nSum = Number(this.getField("YesPerc1").valueAsString);
// Perform Calculation
var nSum = (nA / nB)*100;
// Assign Result to Field
event.value = nSum;
The select format category is None. I need the calculation to round to 2 decimal places ONLY. I have spent the last two days going cross eyed searching for the answer. I am a newby to any sort of script. Thanks for the help!
