Brian Dunning's FileMaker Custom Functions

ValueMask ( value ; template ; placeholder )

convert a value into a masked value ( by template )

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

Michael Bijnens   Michael Bijnens
freelance developer
/

Share on Facebook Share on Twitter

  Sample input:
valueMask ( "0123456789" ; "####/##.##.##" ; "#" )
  Sample output:
0123/45.67.89

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

This custom function converts a input value into a masked value by given template.
It can be used for formatting phone numbers or variable numbering.

ATTENTION : Yet it doesn't check if the length of the input value is equal to the
length of the template! Use a Case / IF function to check.

 

Comments

Bart Bartholomay   Bart Bartholomay, South Florida
Feb 25, 2014
Should this string near the bottom of the CF "cf_mb_ValueMask" actually be "ValueMask"?
 
Michael   Michael, Belgium
Feb 25, 2014
@ Bart Bartholomay:

U where right! I already changed it.

Thanks..
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: