Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to count the number of times a value within a certain range is entered in a form?

New Here ,
Oct 29, 2016 Oct 29, 2016

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.

TOPICS
Acrobat SDK and JavaScript
277
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 30, 2016 Oct 30, 2016
LATEST

You will need to write custom JavaScript calculation and that is going to require a lot more information like the field values to test, what the individual score range is for each calculation, etc.

Do you want the values calculated by category or by total only?

Can you link to sample questionnaire?

This would save other responders from having to recreate the form from your brief description.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines