Brian Dunning's FileMaker Custom Functions

ZeroLeading ( number ; numberOfDigits )

make a number a specific length by leading with zeros

  Average rating: 4.6 (25 votes) Log in to vote

Ignacio Yaselli   Ignacio Yaselli
Carbon Crystal

Share on Facebook Share on Twitter

  Sample input:
ZeroLeading ( 13; 4)
  Sample output:

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

This function uses recursivity to append as many zeros as required to the number.
The advantage of this method is that it does not require a "buffer" of any size...



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.