Phone Numbers
How does SearchResults look for phone numbers?
(SearchResults does some work with international phone number formats, but most of the tricky stuff concerns US numbers, which we'll discuss here.)
Let's assume that the customer has the following valid phone formats:
[The following we consider to be invalid: 503.123-4567, 5031234567, 503-1235678 ]
The user will most likely enter this into the search field:
To achieve this, we use the following 4 search requests on every search in a Phone table:
In this way, we get these results, with or without the area code:
SerachResults can be modified to perform looser searches to find more numbers,but some of these can slow your searches down. It is our recommendation that if you can't find phone numbers you're looking for, you introduce *s into your search criteria (searching for *123-4567 if you're not sure of the area code) rather than hard code *s into SearchResults search scripts, which would slow down all searches.