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
BedrockMission!

Learn More

View all

Sign in to view all badges

Autonumber field will not stop recalculating

Avatar

Avatar
Validate 1
Level 1
dperani70
Level 1

Likes

0 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
dperani70
Level 1

Likes

0 likes

Total Posts

16 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
dperani70
Level 1

29-04-2016

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 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

03-05-2016

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 = …

instead.

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;