Brian Dunning's FileMaker Custom Functions

Static_Length ( FillChar ; Len ; String ; LR_Flag )

Turns any string to a fixed length adding Leading or Trailing Char

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

Antonios M. Kesmetzis   Antonios M. Kesmetzis

Share on Facebook Share on Twitter

  Sample input:
Static_Length ( * ; 15 ; 10.0102 ; 2)
Static_Length ( * ; 15 ; 10.0102 ; 1)
  Sample output:


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

String: Any number or text
FillChar: Any character to fill
Len: The desired legth of the resulted string
LR_Flag: When its value is 1 the number is padded Left, i.e. Leading chars are added
When its value is 2 the number is padded Right, i.e. Trailing chars are added

The functions returns a string of fixed length, defined by Len, with Leading or Trailing chars, defined by FillChar
and the value of LR_Flag

If the Length of the String exceeds Len the string unaltered is returned



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.