Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

calculation with a validation..


Not applicable
I have a numeric field that does a calculation if (hasvalue) another field..which makes this numeric field show 0. I also have a validation that the input of this field must be 40-140. So when opening it shows 0 and the error message pops up. Is there anyway to have it not show 0 when the pdf opens so the validation script doesn't show an error?
6 Replies


Level 10

I am guessing that because the script is in the caculation event and there is no data in the other field, it is showing a zero.

You could try an IF statement in the calculation event, which first checks if the other field is null. If it is then it would set the current field to null as well. If the other field hasValue then the calculation would be processed.

Good luck,



Level 10
Clicking "Allow Zero" for the Display pattern for the offending field will stop "0" from displaying.

I'm not sure whether or not this will help your calculation script.


Not applicable
I dont see an "allow zero" for the display pattern ?


Level 10
There should be - if you click on "Patterns" on the object palette the window that pops up has options on the right side for "Allow Empty" and "Allow Zero".

Unless you are using an older version? I'm in 8.2.


Level 10
Here's what goes in the Display Pattern when I hit Allow Zero: zero{}

Maybe give that a try in wherever the Display Pattern is in your version.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now