Copy link to clipboard
Copied
This is the area that I want the numbers. Each time I open the pdf document create a different billing number. I think that the code is in Javascript but I don't know.
I'm going to use 10 digits. Where I place the code?
Thanks for your help.
Go to Tools - JavaScript - Document JavaScripts, create there a new item called "scripts", and then paste this code into the window that opens:
this.getField("WORK ORDER").value = util.printf("%010d", (Number(this.getField("WORK ORDER").value) + 1));
Copy link to clipboard
Copied
Do you want it to be a random number, or a sequential one?
Copy link to clipboard
Copied
What code can I use to have sequential numbers beginning with a specific number like 2018-IN-20000, next number being 2018-IN-20001? Thank for any help.
Copy link to clipboard
Copied
instead of "WORK ORDER" for the field id its "DOCKET NO" thanks
Copy link to clipboard
Copied
Example. 00000001 (Secuencial)
Copy link to clipboard
Copied
Go to Tools - JavaScript - Document JavaScripts, create there a new item called "scripts", and then paste this code into the window that opens:
this.getField("WORK ORDER").value = util.printf("%010d", (Number(this.getField("WORK ORDER").value) + 1));
Copy link to clipboard
Copied
Works great!!!!!! Thanks try67​
Copy link to clipboard
Copied
Another ? try67​. I test it and works fine. when I open the document, I need save it first before complete all the information or save as like a new document?
Thks
Copy link to clipboard
Copied
Not sure what you mean... If you want the document to automatically save when you open it (after the invoice number is changed, I assume) then that is possible, but it requires installing a script on the local machine.
Copy link to clipboard
Copied
Thanks try67​ for your support. I appreciate that. Thumbs up
Find more inspiration, events, and resources on the new Adobe Community
Explore Now