These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Number each form unique

bwadsager
Registered: Feb 3 2009
Posts: 12
Answered

I'm trying to create a script or field that will enable me to form a unique number for a distributed form by the use of a button. The user fill in the form and then pres the button and the the consequtive number for this type of report is generated.

Is this possible. I have an idea about storing the number created in a text file, and next time then retreive it add one and save it again, but it makes my hair go grey.

Does anyone have a suggestion how to solve this.

My Product Information:
LiveCycle Designer, Windows
jonom
Registered: Jan 31 2008
Posts: 133
I use a javascript that bases the number on the time and date.

It generates a 10 digit number and if the form is saved and reopened it won't regenerate the number. I have it on the Initialize event for the field.

if (this.rawValue == null) {var d = new Date();this.rawValue = parseInt(d / 1000);}else {this.rawValue = rawValue;}

Other than that I think you need access to a server to store numbers for you.
bwadsager
Registered: Feb 3 2009
Posts: 12
Jonom, thanks for your reply.

I thought about using time and date, but would prefer numbers so the reports will be consequtive in numbering.

Do you know if it is possible to save a txt file on the server and then retreive a value from this?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Duplicate post [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=20288]creating a number from a txt file[/url]

George Kaiser