DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Adding a Property to the Advanced People Search and a Column to the People Result Webpart

Posted by PANVEGA on June 9, 2009

A customer asked me to adding a Property Field called “Manager”  in the People Search Advanced Mode. For this demonstration I added  custom property called “Manger” to the profile properties, and in the following walkthrough I will show how to add searching on that property to the advanced search screen of the people search. In addition how to add this new field the your Search Core Results Webpart results. Tis how to is devided in 2 main parts.

First Part

First step is to add a new property to the Advanced Search Webpart. It should look like this advanced Properties (Manager),


  • Open the search page you want to edit the advanced search for and use the “Site Actions”>”Edit page” menu to edit the page.
  • Open the menu for the  People Search web part and select “Modify shared web part” to open the web part property pane.
  • Expand the “Miscellaneous” section in the properties pane and find the property called “properties”
  • This property contains an XML string that allows you to define what properties will be displayed in the advanced search.
  • Edit the XML string and save it back into the property. I added a line (last line in the following example, marked in green) to add the branch property I created, and the end result looks like this:

<Property Name=”Department” ManagedName=”Department” ProfileURI=”urn:schemas-microsoft-com:sharepoint:portal:profile:Department”/>
<Property Name=”JobTitle” ManagedName=”JobTitle” ProfileURI=”urn:schemas-microsoft-com:sharepoint:portal:profile:Title”/>
<Property Name=”Responsibility” ManagedName=”Responsibility” ProfileURI=”urn:schemas-microsoft-com:sharepoint:portal:profile:SPS-Responsibility”/>
<Property Name=”Skills” ManagedName=”Skills” ProfileURI=”urn:schemas-microsoft-com:sharepoint:portal:profile:SPS-Skills”/>
<Property Name=”QuickLinks” ManagedName=”QuickLinks” ProfileURI=”urn:schemas-microsoft-com:sharepoint:portal:profile:QuickLinks”/>
<Property Name=”Manager” ManagedName=”Manager” ProfileURI=”urn:schemas-microsoft-com:sharepoint:portal:profile:Manager“/>


  • After saving the property to the web part, publish the page, exit edit mode and switch to advanced search
  • In addition you have to map the field in the Central Administration from your Active Directory User Profile.
  • Finally make a Full Import.

thats it. This is for the advanced People search web part in general – no limit to people search.

Second Part

If you wonna see the new added Manager Field in your People Result Webpart you have to follow the following steps. The next step is to add the Manager Field to your People Result Search Webpart.


  • First you go to your People Search Page and execute a search on a certain name for wich you know you will find results.
  • On the results page you click on Site Actions / Edit page.
  • For the People Search Core Results web part you choose Modify Shared Web Part.
  • Open the Results Query Options by pressing on the + sign in front of it.
  • Look up the Selected Columns field and press the […] button and you’ll get this:

<root xmlns:xsi=””&gt;
<Column Name=”AccountName”/>
<Column Name=”UserProfile_GUID”/>
<Column Name=”PreferredName”/>
<Column Name=”JobTitle”/>
<Column Name=”Department”/>
<Column Name=”WorkPhone”/>
<Column Name=”OfficeNumber”/>
<Column Name=”Fax”/>
<Column Name=”AboutMe”/>
<Column Name=”PictureURL”/>
<Column Name=”WorkEmail”/>
<Column Name=”WebSite”/>
<Column Name=”Path”/>
<Column Name=”HitHighlightedSummary”/>
<Column Name=”HitHighlightedProperties”/>
<Column Name=”Responsibility”/>
<Column Name=”Skills”/>
<Column Name=”SipAddress”/>

  • Now you’ll be able to include new columns based on the columns you can reference from the user profile database. For example if you wanted to include the manager of a person you’ll want to include <Column Name=”Manager”/>.
  • After you’ve done that the XML getting returned by the Search has the Manager column in it. <Column Name=”Manager”/>
  • Where do you find these column names? Go to your Central Administration, click Shared Services, then Search Settings and click Metadata property mappings.


  • You’ll find the column names in the column Property Name.
  • Open the Webpart in the SP Designer DataView for instance. You will find the columns at the beginnin g of your file.
  • You cann access the Manager attribte <xsl:value-of select=“manager” />
  • Save it, publish the page and retry your Person Search
  • Now you see the new added value in your Person Profile.

That´s it. Good Luck


6 Responses to “Adding a Property to the Advanced People Search and a Column to the People Result Webpart”

  1. Hello,

    I have been searching for some post to display the Manager field in the People search Core results webparts and i have already tried what you have mentioned in the post above but it does not work as the manager field is returned empty. However when i go to “mysite” and see the organizational hierarchy, Manager is displayed over there. Is there any thing else that i need to do that i am missing?

  2. PANVEGA said

    That sound like probems within the Central Administration. Queck again your mappings, user profiles and import fom AD.
    Look at these articles:

    Good Luck

  3. Ricky Singh said

    I have checked the user profiles and the manager property is actually showing data in “My Sites” and Manager property is of the type person, is it some special way to display person type field??

  4. Ricky Singh said

    Thanks man, i got it. found out a silly mistake.

  5. Cameron said

    You really should work out why your quotes (“) are ending up like this: ”

    This makes your shared work really annoying !!!

    But in reality I am greatful for you help


  6. Just as a note, if you find the value isn’t showing in results web part…make sure the User Profile Property you are trying to render Index tick box is set in the SSP ;-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: