How to Customize People Search Results

March 14th, 2007 § 35 Comments

Microsoft Office Sharepoint Server 2007 has a super user directory tool especially for large companies. Using the People Search/Employee Lookup you can easily search for people in your organization by name, job title, department, or any other employee attribute you could think of. But there’s a certain drawback to the results as there isn’t a friendly GUI for you to customize how the information is displayed. Instead you’ll have to edit the XSL if you’d like to change the formatting of the data. You can also include other employee attributes in the results by defining which columns in the user profile database to display such as Mobile Phone numbers.

To customize the People Search Results:

1. Search for a user so you can use that search result as a reference.

2. Go to Site Actions > Edit Page

3. Modify the People Search Core Results

4. Under the “Results Query Options” section, there is a field called “Selected Columns.” Click into this field and then click on the “…” that appears next to it.

5. In the Text Entry box that pops up 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 a person’s mobile phone you’ll want to include <Column Name=”MobilePhone”/>

6. Now you’ll be able to edit the XSL to display the phone number using something like this:

<xsl:text>Mobile Phone: </xsl:text>
<xsl:call-template name=”DisplayOfficeProfile”>
<xsl:with-param name=”mobile” select=”mobilephone” />

That should be it. Don’t forget to check-in and publish your page!

Advertisement

§ 35 Responses to How to Customize People Search Results

  • John says:

    What they want is a page where they can see a list of phone numbers based on an Active Directory group membership.

    Thanks
    JK

  • Simon says:

    Is it possible to have the Employee Lookup work against part names?

    e.g seach for
    Phil

    get results for
    Phil
    Philip
    Phillip

    etc

  • Henry says:

    i’ve seen someone configure it to work like that before but not out of the box I don’t think. I remember reading about a synonyms file somewhere that you might be able to use to accomplish that.

    • Aditya says:

      Hi Henry,

      I have little diffrent kind of problem. when I am going to search people’s name it is working fine but problem is occuring only when name start with like O’Quinn. it is not giving any result for name like O’Quinn. Can you help me to sort out this problem

      Thanks

  • SharePoint Links 04.13.07

    Here’s some links to the best articles on SharePoint 2007 in the blogosphere:

    SharePoint Team blog provide us with a Visio logical architecture design samples file to give you a jump start on your own design and a Debugger “Feature” …

  • Hina says:

    Dear all,
    I want to present my contact in below order.

    Employee Name (12)
    Designation, unit
    Phone No
    Cell no
    Email address:

    I am using XSL of People core result web part, but unable to present the above look.
    Anybody knows how to do it.

    Best Regards,
    Hina

  • abby puckett says:

    Hi – I was wondering if you know how to modify the people search results so that the manager name shows up. I have not been able to do that. Thanks, Abby

  • Henry says:

    Hey Abby, it should be the same process as above. Except you’ll have to figure out what the field name is that’s being used to store manager information.

  • Jojo says:

    Hi everybody,

    I was wondering, when you click on the name on the search result page. You will go to the my site of sharenet. Even if the my site is not active. Is there some way to link the name to the Userdisp.aspx when we don’t use the my sites????

    thanks, Jo

  • Ricky Singh says:

    HI Everyone?

    I am also having the same requiement as Hina.
    I want to show the results as
    Employee name
    Designation
    Work ohone
    Email id

    I am able to get only that information of the employees who have their personal sites.
    Do i have to got to the shared Services and import the information of all the users from AD??
    Please help me out on this….

  • Henry says:

    Hey Ricky, you will only be able to display information that has been imported from Active Directory into the SharePoint User Profile Database.

  • Adam says:

    Why can you only display information from AD? SharePoint profile properties can be mapped and referenced in other areas of SharePoint… this restriction doesn’t quite make sense to me.

  • Henry says:

    Hey Adam, that’s true that you can reference other areas of SharePoint. Importing from AD is probably an easy choice since most of the account information you’re looking for is already stored there.

  • Ricky Singh says:

    HI Everyone

    I have posted this problem before also but did not get the expected reply.
    Let Me explain again.
    In people search core results i want to show the results as follow-
    Employee name
    Designation
    Work phone
    Email id
    Departmet

    All the Information is coming from the AD but not able to show in the Results.
    What do i have to edit to show the desired results.
    Waiting…………….

  • sendil says:

    HI Everyone?

    I am also having the same requiement as Hina.
    I want to show the results as
    Employee name
    Designation
    Work ohone
    Email id

    I am able to get only that information of the employees who have their personal sites.
    Do i have to got to the shared Services and import the information of all the users from AD??
    Please help me out on this….

  • Hi Richy, sendil

    Well I can understand your problems. I had the same requirement. But ok,… this is what I created:
    http://dl.getdropbox.com/u/19735/web/peoplesearch.jpg

    Not all the informations of one user comes from the AD. There are informations like “Autotyp” (Cartype) or “Autonummer” which are filled up in SharePoint after the User was for the first-time imported (updates from AD doesn’t remove the custom field-informations).

    Well, to create such a result for persons you have “just”to fullfill the five steps as Henry described above. But you need to know modifing XSL-specifications. Further the follow link my help:
    http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1669

    With such an XSL you get the XML-result. So you can easily create a XSL for your own result-page. For me this was a real great help. Because I had the most problems by resolve the XML-name of fields to get them on my page.

    Hope this helps (and I hope you understand my ‘ugly’ english) ;-)

    Adrian

  • Henry says:

    Thanks for the post Adrian!!

  • Ricky Singh says:

    I have a another issue not related to the current post but i thought one of you might be able to help on this. I am not able to either fix the height or width of the List view Webparts.Is there any way to correct this bug??

  • Ricky Singh says:

    Thanks Adrian, I was able to get the Search thing going through the XSL using Sharepoint Designer.

  • Ricky Singh says:

    I have another problem.
    I have site colection that is using only one content database but my site collection has many subsites and i want to check the size that each subsite is using in the database..is there any way that i can get the size of subsites?

  • Jay says:

    Ricky,

    I am looking to format my results page as well, but am having problems working with Designer to pull the info…can you help me with the XSL you used?

  • Geno - USA says:

    When adding a column using the instructions generously provided by Henry, the following error message occurred in the core results web part:

    “An item with the same key has already been added.”

    After publishing the site, everything worked, but the message scared me a bit.

    By the way, you can extend Henry’s logic to replace the employee image with an image from a document library in the following way:

    Add the employee image to an image library (my client wanted to use lastnamefirstname.jpg convention). An example of the image URL is http://fqdn/HR/EmployeeImages/LastnameFirstname.jpg.

    Add the column names for lastname and firstname to the query as Henry instructs above.

    Edit the XSL and replace the image src={pictureurl} with image src=”http://fqdn/HR/EmployeeImages/{lastname}{firstname}.jpg”.

    This took me a while to figure out, so I hope it helps somebody else.

  • Geno - USA says:

    Please note that the instructions provided by me are for replacing the images in the peopleresult.aspx search result page (in a SearchCenter with Tabs site).

  • Pradeepti says:

    Hi Everybody,

    In our Active Directory , our profiles do not have the data for Skills and Responsibilities.
    We have imoprted the profiles to Sharepoint and are able to search users based on email,name and department only.
    How can we search based on the Skills and Responsibilities (we have updated our profile at MyProfile using MySite).

  • Derek J. Punaro says:

    I’m having trouble getting “Manager” to display as well. Is there something special about Person type fields? My other changes are working fine.

  • Surachai says:

    Hi,

    Is it possible to increase thumbnail picture size in people search result page and/or in My Site page?
    I’m using MOSS2007.

    Please help….

  • Ricky Singh says:

    I’m having trouble getting “Manager” to display. Is there something special about Person type fields? My other changes are working fine.

  • Lacy Strube says:

    Nice level of information here. There is so much data around about this subject that sometimes you cannot see the wood for the trees but you have pitched this at just the right level so that the lay person can understand – thank you!

  • SKB says:

    Does anyone else find it annoying the when you click on a profile from people search results, it opens their mysite in the same window, which means there’s no obvious way for people to return to the original sharepoint site?

    Has anyone found a way to get round this?

  • Strauss says:

    If you could go on a date with one celebrity if theyre currently married or you are lets pretend youre both single who would it be and why?

  • megs says:

    Is it possible to remove the defualt field Workphone instead only display mobile Phone number in sharepoint 2003 people search resultand If yes then what is the way to do it.

    Thanks

  • Taenkeren says:

    how can this be accomplish on 2010?

Leave a Reply

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

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

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

What’s this?

You are currently reading How to Customize People Search Results at The SharePoint Swiss Army Knife.

meta

Follow

Get every new post delivered to your Inbox.

Join 584 other followers