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

Need help calculating an "average" field when N/A is selected

Community Beginner ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

Hello...

I'm working on an evaluation form that has 5 "scores" to be added and then averaged. Each score could be 1, 1.5, 2, 2.5, 3 or N/A. Getting the total score is no problem...got that. BUT for the "average" field (for example), if N/A is selected for 2 of the 5 scores, the "average" function is still using 5 as a denominator instead of 3. How do you get the calculation to ignore "N/A" entries for the "average" field? PLEASE help!!!! I can attach the form if needed...

Many thanks!!

TOPICS
Acrobat SDK and JavaScript

Views

679

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Apr 23, 2020 Apr 23, 2020

You need to use a script to do it. I've posted code that does it multiple times on these forums. Try searching for "calcAverage".

Votes

Translate

Translate
Community Expert ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

You need to use a script to do it. I've posted code that does it multiple times on these forums. Try searching for "calcAverage".

Votes

Translate

Translate

Report

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
Community Beginner ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

LATEST

Thanks for the "search term"!! Got it to work perfectly!!!

Votes

Translate

Translate

Report

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