Page 1 of 1

Formatting Switch.Calculation output

Posted: Fri Feb 27, 2026 10:45 am
by gsmith
Good morning. I am looking for some help in formatting the output of a switch calculation. I do a basic calculation on metadata to pull the printed sheet count of an imposed file. I will be using the result to make a data matrix printed on the job to pass the information to a finishing machine. However the data always needs to be four digits. Is there a simple way to add formatting to the calculation to add leading zeros to ensure the calculation result is always 4 digits?

Re: Formatting Switch.Calculation output

Posted: Mon Mar 02, 2026 4:44 pm
by magnussandstrom
One way of doing it, if you don't have the scripting module, is to use the 'Rename job' app that have the capability to add leading zeros.

1. Rename the job to the calculated number (choose to Remember original filename)
2. Add leading zeros
3. Pickup the job name as Private data: numberWithLeadingZeros
4. Revert the job name to the original name

It's not pretty but it should be functional.