Matthew McDermott, MVP

All MindsharpBlogs

My Links

Post Categories

Article Categories

Archives

Blog Stats

Play

Work

Yet another SharePoint People Finder

So as Wayne said we have been working to implement SharePoint Portal Server at his company MegaPath*.
We added a search scope for the People content source and did not like how broad the result were. A search for "Wayne" returned documents, sites, his manager and direct reports in addition to his "Personal Site" result that links to his personal site. What we really wanted was a result set of personal sites only. Since MegaPath maintains contact information in Active Directory for their employees, this search would eliminate the need for a separate "Employee Phonebook".

I researched several options and found the best to be a modifications to Mark Bower's Wildcard People Finder. Mark uses JavaScript to send a GET query to the SharePoint search page. The change that I needed to make was in the where clause, Mark uses the content class "urn:content-class:SPSPeople". This returns essentially the same results as the People advance search option. I wanted to only return results for:

  • First Name - urn:schemas-microsoft-com:sharepoint:portal:profile:FirstName
  • Last Name - urn:schemas-microsoft-com:sharepoint:portal:profile:LastName
  • Preferred Name - urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName
  • Account Name - urn:schemas-microsoft-com:sharepoint:portal:profile:AccountName

So I added additional CONTAINS clauses to the query to further focus the search results.

You can download my modified version of the file. It is implemented as a Content Editor web part since it is all just JavaScript. Later I plan on adding this functionality to my WSS Search Box (which I still need to blog). To implement the web part import it as you would any other DWP. Open the source editor and change the [SERVER] to point to your portal search page.

Download Sample

 

One additional cool thing that Wayne had me do was add the part to three pages, the home page, the My Site template and the Search page. The first two are easy. The Search page was a challenge until I figured that you can simply add "?Mode=Edit&PageView=Shared" to the page URL to display the "Modify Shared Page" link. Then you can import the web part as you would on any other page.

 

*Wayne approved this modest release of information about his project.

posted on Wednesday, July 20, 2005 7:04 AM