Skip to main content
Participant
November 1, 2022
Answered

Getting percentage number based on two fields

  • November 1, 2022
  • 1 reply
  • 500 views

Wondering how I can calculate two numbers and get a percentage? I'd like to divide "pass checks" by the total possible "38" to get the "pass or fail" calculation. How would I acheive this? Thank you!

 

Fig 1.1

Fig 1.2

This topic has been closed for replies.
Correct answer Thom Parker

Put a calculation script in to the "pass or fail" field.

 

event.value = this.getField("pass checks").value/38; 

 

 

 

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
November 1, 2022

Put a calculation script in to the "pass or fail" field.

 

event.value = this.getField("pass checks").value/38; 

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often