Skip to main content

PADLEFT

Pads out a string to the left.

Syntax

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

Inputs

ObjectData TypeDescription
valueStringThe string to pad out.
characterStringThe character to use to pad out the string.
numIntegerThe 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 which will look like "    Simego" in the UI.