Sequential numbering when saving a document.


hi,

 

i creating first aid fillable log form. want able have master document , each time opened , saved (using 'save as') following document generate new number (001, 002, 003, 004, 005 etc.). need numbering start @ 001 , go increments of one. have looked online , found following:

 

var f = this.getfield("serial");

if (f.value=="") f.value = "001";

else f.value = util.printf("%04d", (number(f.value)+1));

 

however not seem change each time saved (i don't know js, see says 'print' there.

 

once save document using 'save as' , open again @ later date edit (and save it) don't want document generate new numbers, mater document.

 

could me re-write or write new javascript work need.

 

many in advance.

where did place code?

how code supposed know want value updated when save file, , when shouldn't update it?

 

ps. "print" in code has nothing printing.



More discussions in PDF Forms


adobe

Comments

Popular posts from this blog

after effects warning: unable to create drawing surface

Maximum number of authorizations reached!