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 - Show more from this author
PIPCO IT |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This is based on the formatting described here: https://www.area-codes.org.uk/formatting.php
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.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.