Brian Dunning's FileMaker Custom Functions

PhoneFormat ( Phone )

(A simplified version of phone.format)

  Average rating: 4.1 (14 votes) Log in to vote

Kyle Williams   Kyle Williams - Show more from this author
Augusto Digital
https://www.youtube.com/channel/UCpJlB7cmVNMjbjgY96MEsng

Share on Facebook Share on Twitter

  Sample input:
PhoneFormat(1234567)
PhoneFormat(1234567890)
PhoneFormat(11234567890)
PhoneFormat(1234)
PhoneFormat(1-2-3-4x5c6h7)
PhoneFormat(1-2-3-4x5c6h7890)
  Sample output:
123-4567
(123) 456-7890
1 (123) 456-7890
1234
123-4567
(123) 456-7890

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

I designed this so that you wouldn't have to worry about entering in any 'format' variable since that seemed kind of redundant and unnecessary. Figured I would share it just in case anyone else felt the same way and just wanted a simpler function to work with.

 

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