FILLLEFT

The FILLLEFT function returns a text item of the length specified. In the output, the text item is preceded with the specified pad value.

You can use FILLLEFT when you have a value that needs to be of a fixed size with a variable number of leading characters with a specified value.

Syntax:
FILLLEFT (single-text-expression , single-text-expression , single-integer-expression )
Meaning:
FILLLEFT (text_to_fill , pad_character , pad_to_length)
Returns:
A single text item

The FILLLEFT function returns the text string that results from padding out text_to_fill by preceding it with the pad_character up to pad_to_length bytes.

If the pad-length argument is less than the number of bytes in the text to fill, no padding will appear.

Examples

  • FILLLEFT ( AcctID:Transaction , "0" , 5 )

    If AcctID has the value 14, FILLLEFT returns 00014

  • FILLLEFT ( NUMBERTOTEXT ( InvoiceAmt ) , "*" , 10 )

    If InvoiceAmt has the value 24.75, FILLLEFT returns *****24.75

Related functions

  • FILLRIGHT
  • LEAVEALPHA
  • LEAVEALPHANUM
  • LEAVENUM
  • LEAVEPRINT
  • SQUEEZE
  • SUBSTITUTE
  • TRIMLEFT
  • TRIMRIGHT

Feedback