We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
This Forum has been quite helpful in creating a Purchase Order that automatically generates unique sequential numbers each time the form is open. I used this script:
var num = this.getField("Text1"); num.value = Number(num.value)+1; num.defaultValue = num.value;
My question is: how do I go about distributing said form? I need to email it to 3 different people. If they open the form at the same time, how do I prevent the same number from generating for each individual?
(I tried reproducing the form with different number sequences for each person, but the (auto generated) number is only changing on the original form.)
Any help would be greatly appreciated.
is this an acrobat dc question?
Yes, this is Acrobat DC
Isn't it it more prudent to generate a unique PO number BEFORE you email it to people? I'm afraid I don't understand the logic in your workflow, sorry.
I'm not involved in the PO process typically however I redesigned the form.
We have three folks in our office who need to order materials, etc. They are the ones who generate POs. When they each place an order, I would like then to open the form and have a unique PO number issued per each form opened. This happens several times daily per individual, hence the need for unique numbers.
(Each person has an individual workstation.)
When I worked in corporate settings, our proprietary accounts payable (AP) system generated a unique PO automatically when we logged-in to the software. There was no chance, random or otherwise, that two people could generate the same PO # even if they miraculously logged-in simultaneously.
Only pre-approved employee IDs were permitted access to the AP system. As such, each employee had a permanent access code that the system assigned to their ID and prepended to each PO # for tracking purposes. Example, AC-0004567.
Eric Cartman = 21
Elmer Fudd = 45
Homer Simpson = 71
With this logic, every PO that Cartman generated was differentiated by his unique access number of 21-.
Hopefully this will give you some ideas to work with.
Not possible. Use random numbers, a time-stamp or add some kind of unique identifier to the code in each file, like the name of the user ("JOHN-001", "MARY-001", etc.). The latter still doesn't guarantee they won't get duplicate numbers, if they create a copy of the file and then go back to it, of course.
Really, you're trying to get the features of an accounting system without actually using one. This is likely to be a slippery slope, I recommend you abandon home brewed forms and get an actual accounting system. Your auditors will have a fit!
We do have an 'actual accounting system'. Like many however, investing in additional system features is not in the budget given recent economic developments. I believed this to be possible because of other posts that I researched. Turns out that it is possible. A bit of creativity goes a very long way!
Thanks for the input.
I found a source that has helped tremendously--persistence does pay off. For anyone who has a similar question, access the link below: