Distributing Form that generates sequential numbers to multiple individuals
Copy link to clipboard
Copied
Hello,
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.
Copy link to clipboard
Copied
is this an acrobat dc question?
Copy link to clipboard
Copied
Yes, this is Acrobat DC
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi Nancy,
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.)
Copy link to clipboard
Copied
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.
Access Code:
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I found a source that has helped tremendously--persistence does pay off. For anyone who has a similar question, access the link below:
https://answers.acrobatusers.com/How-create-sequential-numeric-ID-generator-upgradable-q22368.aspx
Copy link to clipboard
Copied
Did you receive an answer on the master file number? I'm experiencing the same issues. I read the answers, but I didn't see a response to your last question.
Copy link to clipboard
Copied
What do you mean by "master file", exactly? Is this a single file shared by multiple users (over a network, presumably)? If so, the file will remain locked for all users, except for the first one who opened it. This is not a good solution.
Copy link to clipboard
Copied
Yes, the form is for multiple users.
Copy link to clipboard
Copied
That's not going to work, sorry.
Copy link to clipboard
Copied
Thanks anyway

