Brian Dunning's FileMaker Custom Functions

FormatPhone ( PhoneIn ; AreaCode )

Masks or refomats North American phone numbers

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

Chris Harvey   Chris Harvey
Bank of Bermuda

Share on Facebook Share on Twitter

  Sample input:
FormatPhone ( "#5551212; "441")
  Sample output:
(441) 555-1212

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

Masks North American phone numbers, and adds an area code if none given. Does not reformat any numbers that don't match the North American pattern (7 or 10 digits). Used with an area code lookup table it is quite useful: FormatPhone ( PhoneNumber; Lookup ( AreaCodes::AreaCode;"")).



Log in to post comments.


Note: these functions are not guaranteed or supported by 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 15 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:

Under construction. Email me your wish list for improvements.