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

The value entered does not match the format of the field

New Here ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

This error message is coming up after trying to complete the following division equation to create a Percentage (which is formatted to percentage with two decimals):

Openended/(Closedended+Openended) in a simplified field notation.

I have tried multiple custom calculation scripts that create a null or 0 or blank field because the Openended and Closedended both are formatted to number; however, I continue to get the same error message.

 

TOPICS
Acrobat SDK and JavaScript

Views

480

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 , Aug 31, 2020 Aug 31, 2020

Try use this code in your percentage fields as "Custom format script":

event.value = util.printf("%,0.2f%",event.value);

Votes

Translate

Translate
Community Expert ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

You can use this as "Custom Format Script" of both Openended and Closedended fields:
AFNumber_Format(2, 0, 0, 0, "", true);

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
New Here ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

I have come to realize this error message is also connected to when I create additional fields for other percentages using the same equation with different field names; somehow they are linking together.

For example:

(Openended/(Closedended+Openended) = Percentage of Awareness Questions

(OpenendedAn/(ClosedendedAn+OpenendedAn) = Percentage of Analysis Questions. 

If I only calculate the Percentage of Awareness Questions this error message will still pop-up but only if I delete/clear information in the Opendened or Closedended fields.

As soon as I create the Percentage of Analysis Questions field and try to complete the calculation. This error message comes up twice:

- The value entered does not match the format of the field [ Percentage of Awareness Questions ]

-  The value entered does not match the format of the field [ Percentage of Analysis Questions ]

Any help would be greatly appreciated. My initial assumption is a "custom calculation script" is necessary, given that the error is occurring even using the "custom format script"

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 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

Try use this code in your percentage fields as "Custom format script":

event.value = util.printf("%,0.2f%",event.value);

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
New Here ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

LATEST

Thank you that worked! I actually only needed to use this "custom format script" for the percentage and did not have to use the previous "custom format script" for the numbers.

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 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

You will get the message when you divide by zero.

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