Skip to main content
New Participant
May 18, 2021
Question

Distributing Form that generates sequential numbers to multiple individuals

  • May 18, 2021
  • 5 replies
  • 2923 views

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.

This topic has been closed for replies.

5 replies

PAULABC7CAuthor
New Participant
June 10, 2021

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

Participating Frequently
January 3, 2024

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.

try67
Adobe Expert
January 3, 2024

Yes, the form is for multiple users.


That's not going to work, sorry.

Brainiac
May 18, 2021

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!

PAULABC7CAuthor
New Participant
June 10, 2021

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.

try67
Adobe Expert
May 18, 2021

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.

PAULABC7CAuthor
New Participant
May 18, 2021

Yes, this is Acrobat DC

Nancy OShea
Adobe Expert
May 18, 2021

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.

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
PAULABC7CAuthor
New Participant
May 18, 2021

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.)

kglad
Adobe Expert
May 18, 2021

is this an acrobat dc question?