Skip to main content

Counters

The code to insert a counter is {COUNTER}. It requires at least one parameter, which is the name of the counter to insert.

Example:

S/N: {COUNTER;SerialNum}

Assuming the variable SerialNum has the value 42, and a width of 4 characters, then it will be printed like this:

S/N: 0042

Additional number formatting parameters can be added to control how the counter is formatted, e.g. the width and padding character can be changed.

Batch: {COUNTER;SerialNum;WIDTH=5;PADDING=#}

This will instead be printed as:

S/N: ###42

See the Number formatting section for more advanced examples.