Brian Dunning's FileMaker Custom Functions

PhoneFormat ( InPhone )

Format into 1 to 3 digit chunks with a final 4 digit chunk. Extensions not handled. Not recursive.

  Be the first to rate this function Log in to vote

Richard DeShong   Richard DeShong - Show more from this author
Logic Tools
http://logictools.com

Share on Facebook Share on Twitter

  Sample input:
PhoneFormat ( "1234567890" )
  Sample output:
123-456-7890

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

Simple phone format expected to be used as auto-calc for a table field (not to set a variable).
"Simple format" means no parentheses (although you can add if needed).
Not recursive. Let-Case structure.

Case structure allows you to determine how any length of digits should be handled.
It also is fairly straightforward to add special cases for country norms, although I think our need for special visual clues is not needed - just need a series of short chunks to make it easy to remember for a few seconds.

 

Comments

查明胜   查明胜
Apr 3, 2020
👍Just need this!
 

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: