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

arithmetic over/underflow

Avatar

Level 1

I am getting over/underflow error, below is the formula and related values:

 

UtilizedContractValue = 0

ApprovedContractValue = 0

 

$=(UtilizedContractValue/ApprovedContractValue)

 

When you open the form both values are zero initially.

 

Need help to resolve it trough 'FormCalc' 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Divide by zero is not a valid case, you will always get exception.

You need to put a check, in case the divisor is 0

https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle-discussions/help-divide-by-zero-err...



Arun Patidar

View solution in original post

6 Replies

Avatar

Community Advisor

@AKI15A9 Can you please let us know which tool you are using ? Doesn't seem to be an issue related to AEM 

 

@kautuk_sahni 

Avatar

Correct answer by
Community Advisor

Hi,

Divide by zero is not a valid case, you will always get exception.

You need to put a check, in case the divisor is 0

https://experienceleaguecommunities.adobe.com/t5/adobe-livecycle-discussions/help-divide-by-zero-err...



Arun Patidar

Avatar

Level 1
Thank You, but I am still getting error. Maybe my script has mistake. Can you suggest a script?

Avatar

Community Advisor

can you try like

 

if ( ApprovedContractValue > 0 ) then (UtilizedContractValue/ApprovedContractValue) endif

 

check the guide at https://helpx.adobe.com/pdf/aem-forms/6-2/formcalc-reference.pdf

 



Arun Patidar