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
https://www.carboncrystal.co.uk

Share on Facebook Share on Twitter

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

  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...

 

Comments

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.