Brian Dunning's FileMaker Custom Functions

util.UKPhone ( phone_number )

Determines if the phone number is a valid UK phone number, and if so returns it correctly formatted. If not, returns False (0)

  Be the first to rate this function Log in to vote

Pip Meadway   Pip Meadway - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
util.UKPhone ( "01234892456")
  Sample output:
"01234 892456"

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

This is based on the formatting described here:

It depends on two other custom functions:

util.TextMatchesFormat ( )
util.FormatWithMask ()

In its current incarnation is simply inserts spaces into the phone numbers. If you want to add parentheses then change the ~format_list List entry accordingly e.g."(#####) ######"

This works for both landline and mobile numbers. It currently does not include emergency numbers (999, 101 etc) but it's easy to extend if required.



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