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

How to solve “The value entered does not match the format of the field [x]” error issue?

Community Beginner ,
Oct 27, 2022 Oct 27, 2022

I have looked around at this and I have an idea of what the issue is, but I still don't know how to solve it!

The attached is part of a form used to claim meals and gas mileage.  The first 4 columns, the 6th, 7th, and 9th are designed to be in a $ format and the user enters a $ value. 

The 5th column is just text.

The 7th column is a numeric figure, with no decimals allowed.

The 8th is "column 7 multiplied by .55" and would show in $ value, but must be blank if it is zero.

And the 10th column adds up the $ in the row and would show in $ value, but must be blank if it is zero.

 

Take the first line...If I enter anything that isn't a whole number into "HotelLodging1" and "Breakfast1", I get the error “The value entered does not match the format of the field [TotalExpenses1.1]”.  I know it's an error in the calculation in the TotalExpenses fields, and I'm sure it's to do with the 8th column (Amount1 to Amount6) being in the wrong order or something like that, but I can't figure it out!

There may well be other errors in there, but I'm trying to look at one at a time!!

Any help would be greatly appreciated, as it's driving me crazy!

TOPICS
How to , JavaScript , PDF forms
1.8K
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 ,
Oct 27, 2022 Oct 27, 2022

What do you enter in a field when you get alert?

Remove script from TotalExpenses fields and use built in calculation because your script is calculating values as strings, first option in 'Calculate' tab 'Value is the' leave as (sum) and pick fields.

To set field as blank if 0 use this in validation:

if (event.value==0) 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 ,
Oct 27, 2022 Oct 27, 2022

What do you enter in a field when you get alert?

Remove script from TotalExpenses fields and use built in calculation because your script is calculating values as strings, first option in 'Calculate' tab 'Value is the' leave as (sum) and pick fields.

To set field as blank if 0 use this in validation:

if (event.value==0) 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 Beginner ,
Oct 27, 2022 Oct 27, 2022
LATEST

Perfect. Thanks.
Initially, I had it calculated in the calculate tab, but I needed to set blank if 0 and didn't realize that I could use that in validation.
Thanks again. 🙂

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