How to count the number of times a value within a certain range is entered in a form?
I have created a simple scorecard in Acrobat Pro where the user enters answer values from 1 - 10 for a number of categorized questions, and the scorecard then tallies the totals per category.
The scores per category are given a ranking:
v>=0 && v<=19 is POOR
v>19 && v<=30 is AVERAGE
v>30 && v<=41 is EXCELLENT
I'm a complete novice at javascript for PDF forms and have thus far been able to find all the answers I needed on this forum - mostly I just needed to sort out simple calculations and change the colour of the "total" field based on the range of values above, to indicate that category's ranking. So that's all working out at this time.
Now, however, a new challenge has come up wherein I need the form to dynamically count the number of times throughout the scorecard that a user's answer was within the POOR classification, the number of times their answer was within the AVERAGE classification, and the number of times their answer was within the range of numbers that designates an EXCELLENT rating.
I'm looking for a custom calculation script that, for instance for adding up the total number of POOR responses, will count only the number of fields from a designated selection with a value between >=0 and <=19. I do not have the knowledge to write this myself, but if someone could point me to an answer it would be hugely appreciated! Thank you in advance.