Brian Dunning's FileMaker Custom Functions

PaddedText ( Source ; FillChar ; NumberOfChars )

Pads a text string to a specific number of characters using a fill character.

  Average rating: 4.4 (32 votes) Log in to vote

Andrew Sasaki   Andrew Sasaki

Share on Facebook Share on Twitter

  Sample input:
PaddedText (1; "0"; 2)

PaddedText (12; "0"; 2)

PaddedText ("Hello"; "x"; 8)

PaddedText ("Hello World!"; "x"; 8)
  Sample output:



"Hello World!"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Will add fill characters to text until the text is the desired length. Can be used to add leading zeroes to digits, etc. -- see cample input and output for examples. All outputs are text. It also has the following characteristics:

-Accepts integers as the source text

-If no fill character is supplied, the default is a space

-If the length of the source string is longer than the target length, the source string is unaltered



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.