Brian Dunning's FileMaker Custom Functions

PhoneFormat ( number )

No-fuss formatting of a phone number of varying length

  Be the first to rate this function Log in to vote

Sam Barnum   Sam Barnum - Show more from this author
360Works
http://360works.com

Share on Facebook Share on Twitter

  Sample input:
14155551234
4155551234
5551234
1234
  Sample output:
+1 (415) 555-1234
(415) 555-1234
555-1234
1234

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

Filters out any non-numeric digits, then formats according to the length of the number, recursing smaller chunks back to itself.

 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 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: