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

Calculate average for fields, ignore blank field, and not show 0

New Here ,
Jan 13, 2021 Jan 13, 2021

I have looked through several posts already and have not found a solution that works for me unfortunately. I have a form that has a dropdown form field with the options: " ","1","2", "3", "4", "5". The first blank is so there is not a value displayed if the field has not been answered yet. I would like to calulate the average for the fields and not show the 0 if the average has not been calculated yet. The fields are titled "A1","A2"..."A8". I would appreciate any help. Thank you very much.

TOPICS
PDF forms
2.0K
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
1 ACCEPTED SOLUTION
Community Expert ,
Jan 13, 2021 Jan 13, 2021
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
Community Expert ,
Jan 13, 2021 Jan 13, 2021

In the text field use the "average" calculation, and place this JavaScript as a Custom Format Script to hide the zero:

 

if (event.value == 0) {event.value = "";}


Acrobate du PDF, InDesigner et Photoshoptographe
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
New Here ,
Jan 13, 2021 Jan 13, 2021

Unfortunately I cannot use a custom format script. I tried using that already but when I open the file in Chrome, the 0 shows. I apologize, I should have specified that I was trying to open it in an internet browser.

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
Community Expert ,
Jan 13, 2021 Jan 13, 2021
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
New Here ,
Jan 13, 2021 Jan 13, 2021
LATEST

I got it to work. Thank you very much!

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