Skip to main content
Participant
December 14, 2023
Question

Variable print count

  • December 14, 2023
  • 1 reply
  • 613 views

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. 

 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
December 14, 2023

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.

try67
Community Expert
Community Expert
December 14, 2023

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.