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

ID Number

patra
Registered: Oct 19 2006
Posts: 270

I am using the script below when form open to add a number.
It"s work fine but the only problem that I have any time when I open the form
ID number changes!
Is it possible the number to be the same as the first time when we enter data?

var CurrDate = new Date();
ID.rawValue = (1 + CurrDate.getMonth()) + "/" + CurrDate.getDate() + "/" + CurrDate.getFullYear()
ID.rawValue = "ECF-"+(Math.floor((new Date()) / 1000) )%1000000000;

Thanks

My Product Information:
LiveCycle Designer, Windows
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
Set the value of ID to null/empty/zero/whatever when you design the form, and stick your JS inside an if() loop so it doesn't run if the field has something else in it.
patra
Registered: Oct 19 2006
Posts: 270
Can you give me a little help with the script?

Thanks