0

I am using SharePoint 2010, and have used UPS to import User Information from AD. The problem is the phone numbers are imported like this: +47 12 34 56 78.

That is very good when displaying a number, but not very good when searching.

If the user search 12345678 then it will not get any hits.

If the user search 12 or 12 34 or 12 78 then it will get hits.

So how can I either get SP to recognize and reformat phone numbers with spaces so it gets hit, or tell it to ignore those spaces when matching?

  • 1
    Here is a tutorial which might work for you using a calculated column - nothingbutsharepoint.com/sites/eusp/Pages/… In the example they always have 2 intervals in the phone numbers, so for your case it would be more complicated to fix. – P.G Feb 11 '14 at 14:07
1

Sharepoint search will do its own matching so I think your best bet will be to validate the input of the search Web part. This would be achieved by either forcing the user to enter phone numbers in a standard format, or reformatting numbers from the search box based on logic you inject.

You could do this via client side code (javascript) or You Could create your own search box Web part inheriting from the standard Web part in which executes the logic BEFORE the query is submitted to search.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.