Question

I am a newbie at using InfoPath. I have created a form that allows a person to go in and request credit from another office based on a sale that happened outside of their jurisdiction. The credit is based on up to 12 products (FBUs). The person would enter the total of the project and then enter each product individually with amounts. There are two calculations that happen in this section of the form. The first calculation is the total amount of FBUs, which adds all 12 products together. The second calculation, which is a validation field, subtracts the total project from the total amount of FBUs. If the amount equals 0 then the field turns green and the form can be submitted.

I am running into an issue where after 5 or so FBUs are entered the validation field will not recognize the 0 and an error amount will pop up. For example,I had entered FBU 1 to FBU 10 amounts totaling 76,782.05. The project total is 76,782.05. The Total Remaining is the FBU Total - the Total Project, which should equal 0 however -1.4551915228366852e-11 is showing instead. What am I doing wrong? I cannot figure out why this is happening. Everything is formatted at currencytype, with the currency radio button and 2 decimals selected under the format button.

Était-ce utile?

La solution

I found a work around to keep the hexadecimal -1.4551915228366852e-11 to not appear. I added instructions on the form in each calculation field to round to the nearest dollar. When no decimal number is used in this form, the correct balance of 0 shows instead of the hexadecimal. When you run into this issue and you are able, try rounding.

Also, found a fix to this with a calculation to round. What I did was create a new field called FBU_Remaining_Rounded. Entered the following formula in the field.

round(FBU_Remaining*100)*.01

You can find the article here BrainStorage.com

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top