Copy link to clipboard
Copied
Is it possible to insert a variable that changes on printing? For example, a 1 page maintenance work order that has a serial number on it. Maintenance wants that number to go up every time they print new blank documents.
I haven't seen something like this before but I've also never used variables too in depth either.
Copy link to clipboard
Copied
You can use Document Action, and select Document Will Print, you can place script there to increase serial number by one.
For example:
this.getField("Serial").value += 1;
Change "Serial" to your actual field name.
Copy link to clipboard
Copied
Just be aware that if you need those numbers to be unique you must only have one copy of this file, or you'll get duplicates. If you want unique numbers, AND to be able to open the file on multiple machines you'll be better off using either a time-stamp or a random number.