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.

daft calculation question!

Avatar

Level 1

My apologies for such a basic question but i'm creating my first form and the following calculation gives rise to an arithmetic over/underflow!!?

(NumericField7 / NumericField2) * 100

How can i avoid this error message?

Please advise

Chris

1 Reply

Avatar

Level 2

The error message is coming from your denominator being initially undefined until a value is posted to NumericField2.

The way around it is (in FormCalc):

if (NumericField2>0) then (NumericField7/NumericField2)*100 endif

This tells it to only execute the forumla when NumericField isn't 0 or null.