Skip to main content
Glenn269
Known Participant
October 27, 2022
해결됨

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

  • October 27, 2022
  • 1 답변
  • 1915 조회

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!

이 주제는 답변이 닫혔습니다.
최고의 답변: Nesa Nurani

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 = "";

1 답변

Nesa Nurani
Community Expert
Community Expert
October 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 = "";

Glenn269
Glenn269작성자
Known Participant
October 27, 2022

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. 🙂