Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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 = "";
Copy link to clipboard
Copied
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 = "";
Copy link to clipboard
Copied
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. 🙂
Find more inspiration, events, and resources on the new Adobe Community
Explore Now