You can use this code:
var sum = Number(this.getField("sum1").value) + Number(this.getField("sum2").value) + Number(this.getField("sum3").value) + Number(this.getField("sum4").value) + Number(this.getField("sum5").value); event.value = (sum/25)*100;
PS. If you set the field as having a Percentage formatting then you shouldn't multiply by 100. The value needs to be between 0 (0%) and 1 (100%).
try67 Thank you so much for providing this solution. I still have not got it working correctly, but I'm closer than where I was before.
-- I set the field Format as Percentage (previously I had missed this step).
-- I deleted *100 from the end of the formula in the custom calculation script.
-- Now when I test the form, the calculation is showing as 0.00%. I just cannot see why it will only come out to 0.00% instead of a true calculation.
I appreciate your time, thank you again.
You need to change the value of one of the fields involved for it to kick-in.
Also, check the JS Console (Ctrl+J) for any error messages.
If you've done all of that and it's still not working then you'll need to share the actual file with us.