In some cases you may want to be able to automatically add characters to the beginning of the end of a string so that it always has the same length regardless of the string's value itself.
There is no predefined function in PrintShop Mail that will automatically add characters to a string so that it is always the same length, however it is possible to do this with a very small expression. This also applies for correctly formatting a zipcode when they are missing the leading zeroes, as well as created static length sequences such as ticket numbers.
This may be necessary if your database, which may be formatted correctly and display "00034" for a zipcode in the database manager itself, only displays "34" when imported into PrintShop Mail. This is generally because the formatting that adds the zeroes is within the database software itself, or because PrintShop Mail has identified the column as being numbers and automatically strips the zeroes (which is perfectly valid in a lot of situations).
In PrintShop Mail 6 and 7, you can try to change your zipcode variable's category to "Text" and see if that automatically gives you back the leading zeroes. This is done from the variable's properties pane.
The following expression example will create a 5-digit 0-padded number (e.g. a zipcode):
LEFT("000000" & [Zipcode], 5)
Results: 00034 , 00354, 01534
The following expression example will create a 10-digit 1-padded ticket number:
LEFT("1111111111" & [TicketNumber], 10)
The following will create a string of always 25 characters, right-padded with dots (.):
RIGHT([Name] & ".........................", 25)