Functions

PADLEFT

Pads out a string to the left.

Syntax

string PADLEFT(string value, int num)
string PADLEFT(string value, string character, int num)

Inputs

Object Data Type Description
value String The string to pad out.
character String The character to use to pad out the string.
num Integer The number which corresponds to the length of the string once padding is complete.

Example

Your invoice numbers need to be a minimum of 8 characters in length, however the current invoice number is "1234".

PADLEFT(InvoiceNumber, "0", 8)

Will return "00001234".

NB: If you do not enter a string character to PAD with, the default is a space e.g:

PADLEFT("Simego", 10)

Will return "    Simego".