Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

FormCalc error-arithmetic overflow/underflow

Avatar

Former Community Member
Does anyone know how to get rid of the arithmetic overflow/underflow error? I have a form with calculated fields that works, but I get this error every time I open it. I really don't want to send it out to customers like this. Any suggestions?
3 Replies

Avatar

Former Community Member
Since it is occurring when the form is first openned I'd look for some calculations (particularly division) that are being done in form load/field initialization/field change events. You could add some "message box" display of field names, event name and variable values at the beginning of the events that have calculations to determine which one(s) are running at form load time and what the values are.



My guess is that it is being triggered before one or more of the variables has a value in it. If that is the case, you will want to surround your calculation with a check to ensure that the variables are non-zero, non-null. You may even want to go as far as not running the calculation until after you know the form has been completely loaded and fields are initialized by establishing a variable that isn't set until the end of the form load process.

Avatar

Level 1

I have the same issue that involves two fields that are performing a division calculation based on other fields that are calculating.  I get the overflow error when the form opens. How do I set a default value for a number field? You also mentioned that you could establish a variable that isn't set until the end of the load process.. how would you do that for a field?

Avatar

Former Community Member
Thank You. The problem is fixed. I was dividing two calculated fields that were empty when the form would open. I set a default value for each and it now works.