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

Autonumber field will not stop recalculating


Level 2

I have an adobe form (Purchase Requisition) that we are trying to use a field (SetReqNo) to calculate a number (Business Account number + Date + Time) to autonumber the form.  Problem is the form renumbers every time it reopens.  Since it is a calculated field, making it read only will not help.

So I tried a work around of having a checkbox (LockPRNum) that gets checked when the form is submitted by email or printed and the calculated field (SetReqNo) checks this checkbox and will only calculate if the checkbox is unchecked.  Seems great except it is now changing the calculated field (SetReqNo) to the value of 1!

Not sure how or why but thought I could post this form here and see if anyone can help.  See link to form below.

Link to Form: Dropbox - 0008V07P4.pdf 

0 Replies


Level 10

Well, the script you use to calculate the number is quite complex, but in general only have to wrap the entrie script it into an if expression.

if (this.isNull) {

    // place your calculation script here …


Btw: Your expression

this.value =  …

is wrong and should be

this.rawValue = …


Note: When you want to Reader-enable the form with Acrobat once it got finished, you have to clear the field manually otherwise the field will always hold the calculated value before it was Reader-enabled. To do this, open the the JavaScript console (Ctrl + J) and execute this code line:

this.xfa.form.Form0008.PgContent.SetReqNo.rawValue = null;