Copy link to clipboard
Copied
I would like to create a field on a form for a PO number which would increment by 1 each time the form it opened. Example - the starting number would be 17001 and and stored in the form then next time the form is opened it would increment to 17002 and stored.
Copy link to clipboard
Copied
There are a lot of states that need to be examined.
See Accumen Journal August 2004 for an article discussing this issue.
Copy link to clipboard
Copied
I dont understand what you are trying to say with the link above.
Copy link to clipboard
Copied
That is a link to an article that explains how to use the "global" object in PDF forms to provide an incremental advance when any of the forms in the group is opened. You will have to download the ZIP file and extract the document to read it. Also there are associated PDF files that provide a working example.
Copy link to clipboard
Copied
Does anyone else have an idea of how to do this or if its possible?
Copy link to clipboard
Copied
Is there only going to be one copy of this, or will it be used only on one computer?
If not, there isn't really a way for one copy to know which numbers were already used by another copy, and you'll get duplicate numbers...
Copy link to clipboard
Copied
See this previous discussion: How to create sequential number field?
In general, trying to do this in your document is not a good idea: What if the document is opened on two different computers and new copies are created? You would end up with two different documents that share the same number.
The only safe way to accomplish this is to have the serial number/document number generated outside of the document, and then the document would request a new number from e.g. a web server whenever a new number is required. This way, even when two users work on creating two different documents at the same time, the server would make sure that both documents would have different numbers. See here for one way to implement this: Getting a Serial Number Into a Form Using SOAP - KHKonsulting LLC
Using SOAP is only supported on Adobe Acrobat, not with the free Reader, so if you also want to use Reader to start a new document, you would have to use e.g. FDF to communicate with the server.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now