Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

still getting error after arithmetic over/underflow


Level 1

Hello people,

i am breaking my head over a problem that keeps givving a 'arithmetic over/underflow' error.

I have a list where i can add products (standard value is $0,00) on the bottom i have a GrandTotal (also value $0,00)

I want to perform this calculation: GrandTotal / outcome. Because GrandTotal is a $0,00 value i get a 'arithmetic over/underflow' error when i want to preview this form in pdf.

I added this code:

if ( form1.#subform[0].Body.GrandTotal >0) then

     GrandTotal / uitkomst


this causes the pdf form to load without errors...i thought...FINNALY!!!!

BUT...when i want to add products. i add the amount, then price per piece....and then i get the 'arithmetic over/underflow' AGAIN....with every product i add...

When i add the amount there is no problem, but when i want to add the price i get this error.

picture error.jpg

(Terugverdientijd is the last calculation on page 2 on the bottom of that page)

here is my pdf file.....


i hope someone can help me with this so that i can finish this file...(because this is my last calculation and then it is done)

many thanks


3 Replies


Level 6

The problem is not the Grand Total being zero, it's the uitkomst value.  That doesn't get set until the user fills out the bottom of the form.  When that value is zero, you're dividing by zero which is undefined.

Try:  if ( form1.#subform[0].Body.GrandTotal >0 and uitkomst > 0 ) then...

Hope that fixes it.



Level 1

Kevin....if you where here i would kiss you....

Because i was busy with this form for a long time i start to miss things....

It works...



Level 1

Now the problem that it works on the computer but does not work on my android tablet....the auto calculation does not work....i should of thought about that BEFORE i started to make this form....

so i have to spend my time now finding a app that wil alow me to fill it in AND show the auto calculation...