Formatting Switch.Calculation output
Formatting Switch.Calculation output
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?
- magnussandstrom
- Advanced member
- Posts: 551
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Formatting Switch.Calculation output
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.
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.