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

basic simplified notation get the value entered does not match the format of the field error

Community Beginner ,
May 07, 2025 May 07, 2025

I have a form that has data entry field called SW (setup as required, number to 1 decimal point) then results field (SW6, view, number to 1 decimal point) simplified field notation 45/SW, the form does the calculation but i get the error "the value entered does not match the format of the field

SW field will only have possible entry of 1 thru 8


In the same form I have another data entry field AW (setup as required, number to 1 decimal point), then another results field (AW6) which does a simplified field notation AW*45, which does not get the error.

I've tried various things like removing required, or view, does not make a difference. 

 

Not sure what to do.  Why does it work in one spot and not the other?

TOPICS
PDF forms
185
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
2 ACCEPTED SOLUTIONS
Community Expert ,
May 07, 2025 May 07, 2025
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 ,
May 07, 2025 May 07, 2025

I repeat, the error is from division by zero when the field is empty.  Use the following custom calculation script instead:

if(this.getField("SW").value)

{event.value=45/this.getField("SW").value}

else

{event.value=""}

View solution in original post

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 ,
May 07, 2025 May 07, 2025

Hi @michelle_8298 ,

 

This simplified field notation (SFN) of 45 divided by a value entered in field SW (45/SW) seems OK.

 

However, as explained in the article linked below, Field Names are interpreted as operands. Besides that point, it seems like using SFN in Acrobat is a little clunky when emplying a division like that. 

 

In which case, because the entire line of characters in that code is all stuck together, try doing it like : (45)/SW , (45+0)/SW or using a space 45 / SW.

 

 

After testing it like that a few times, it didn't throw that error if I switched it back  to 45/SW

 

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 ,
May 07, 2025 May 07, 2025

The problem occurs when the SW field is empty.  Division by zero returns Infinity which throws an error when forced into a number-formatted field (see link in my post below).

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 ,
May 07, 2025 May 07, 2025

Yup!

 

Disregard my answer.... I was wrong. The issue came back.

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 Beginner ,
May 07, 2025 May 07, 2025

I tried each one of the combinations and still get the same error.  The calculation works on all of the combinations

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 ,
May 07, 2025 May 07, 2025

If you change the value in the SW field, do you still get the error?  My article posted below explains how to troubleshoot the error.

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 Beginner ,
May 07, 2025 May 07, 2025

when I view the pdf in a browser everything works fine no errors.  When i view the pdf in acbrobat reader dc I get the error.

 

When i'm in acrobat in edit mode  and do a preview works with no errors, but when I clear the form  that is where I get the errors as well.

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 ,
May 07, 2025 May 07, 2025

I repeat, the error is from division by zero when the field is empty.  Use the following custom calculation script instead:

if(this.getField("SW").value)

{event.value=45/this.getField("SW").value}

else

{event.value=""}

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 ,
May 07, 2025 May 07, 2025
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 Beginner ,
May 09, 2025 May 09, 2025
LATEST

great, that works now,  thanks so 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