User profiles in SharePoint can be used for more than just finding people based on general information. You can include more specific details and turn ‘People Search’ into a skills or resourcing database. The image above shows my demo, where someone can search for assistance with customer queries, filtering by product, role and location. Here’s how it was created.
This post requires SharePoint Server 2010 Standard or Enterprise edition. A solution could be created with just SharePoint Foundation Service but would require mimicking the user profile service using a custom list instead.
Step 1: Create the required properties
The first step is to create any additional properties to be used to capture specific information. For my demo, I have created the following properties in the User Profile Service:
- Resource Role – to help identify if someone is pre- or post-sales. The list of roles is a term set (part of the Managed Metadata Service) and includes sales, project team, product support and customer service
- Products – to identify what products someone can help with. This is also a term set.
- Geography – to identify what locations someone can assist with. Yes, another term set…
- Resource Notes – a paragraph field, similar to ‘About me’ but specifically focusing on resourcing issues
- Resource Member – a checkbox, to notify that someone wants to be included in Resourcing search results
The image above shows the section ‘Resourcing’ added to the user profile page for people to complete these properties. The process for doing this was covered in a recent blog post: Create your own user profile properties
Step 2: Modify the display of individual search results
Once you have some specific properties, the next step is to modify the core search results web part to display them. This requires creating a federated location in SharePoint 2010, or modifying the XSL within the People Core Search Results web part in SharePoint 2007.
The image above shows our modified individual search results, displaying the Resourcing properties for one of the users in the demo. The process for doing this was covered in a recent blog post: Displaying more properties in search results
Step 3: Configure the Search Results page to automatically display all available resources
The final stage is configuring the search results page to automatically display all resources so that people can then refine the results to find the specific person who can help with their query.
To do this requires creating a scope to limit results and only display people who have elected to be part of the Resourcing matrix. This is what the checkbox was all about on the user profile page (see step 1). Scopes are created within the Search Service application (or per site collection within the site collection administration). They can be used to automatically limit the results returned for a search query to only those that match the rules of the scope.
In the image above, I have created a scope called ‘Resourcing’ and am pointing it to a search results page that I have created for the demo – resources.aspx (this is instead of the default results.aspx page). The scope contains a single rule to only include people who have checked the box ‘Add me to the Resourcing Matrix’ in their profile. The name for that field is demoResourceMember. Currently, 5 users accounts in my demo have checked the box.
The next step is to automatically display the results of this scope when people click to navigate to the Resourcing page. To do so is simply a case of adding the search term to the URL for the page.
For example, if the page URL is http://intranet/search/resources.aspx then to automatically display all results that match the scope ‘Resourcing’ means adding ?k=Scope%3aResourcing
- ?k= is the start of adding the search query terms. If you perform any search in SharePoint, have a look at the URL and you’ll see this added
- Scope%3a adds the identifier for scopes – ‘Scopes:’
- Resourcing is the name of my scope.
And here’s the finished page (click on image to view larger version):
Some additional tweaks I included:
- Added the Resourcing page as a tab on the Search site – you can see the tab in the image above
- Included the ability to search by all or part of a name, using the Staff Directory Search tweak with an additional button to clear the filter and display all resources
- Modified the Refinement Panel on the left side of the page to display the Resourcing properties created for the user profiles – Role, Geography and Products, thanks to using term sets for those properties – see Managed Metadata Overview. Also, hat tip to Frank Cleynen for providing useful additional details about the refiner parameters
And there you have it, a way to use the Profiles to create a Resourcing database. If I had Lync running on my demo, the solution would also include presence status (the little grey boxes next to each name would be red, amber or green depending on if the users were offline, away (inactive) or online (active).