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

How to display simply zero if the the divisor of a calculated field is zero?

Contributor ,
Aug 05, 2020 Aug 05, 2020

Copy link to clipboard

Copied

Good day!

 

I am doing a fillable PDF. In this document, I have a Reset Button with the following script ...

if(4==app.alert("This action will clear all input fields in this form.\nDo you want to continue?",1,2))this.resetForm()

In this document, I have a calculated formula  as showned below:

(FI017a+FI018a)/(FI017a+FI017b+FI018a+FI018b)*100

When the Reset Button is click, all the numeric fields will be set to zero thus making the operants of the formula zero including the divisor.

I believe this cause the error ...

"The value entered does not match the format of the field [fieldname].

How can I show zero as the result of the computation and disregard the error message.

Appreciate the help. Thank you.

TOPICS
PDF forms

Views

183

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 Expert ,
Aug 05, 2020 Aug 05, 2020

Copy link to clipboard

Copied

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 Expert ,
Aug 06, 2020 Aug 06, 2020

Copy link to clipboard

Copied

LATEST

You should not show zero in that instance. When the divisor is zero (or empty) the result should be empty.

0/5 = 0

5/0 != 0

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