in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

From SharePoint with love

All and anything SharePoint and related (which could be just about anything I suppose).

How to modify the Search Options dialog for the advanced people search

While fooling around with the search result page I decided that it would be useful if my employees would be able to search explicit on these custom properties. I found a couple of tutorials on how to modify the "normal" advanced search page but not much on the people search page so I dug around a bit.

This is what I came up with (sorry for the rush job but I'm in a rush):

  1. Browse to your advanced people search page.
  2. Edit the page.
  3. Modify the People Search Box web part.
  4. Expand the Miscellaneous section.
  5. Click in the Properties text field and open it up in the "builder" (click the ... to the right of the field).
  6. Add the custom property you want to be able to search on where you want it to show up in the form. Use the following syntax:
    <Property Name="YourPropertyHere" ManagedName="YourPropertyHere" ProfileURI="urn:schemas-microsoft-com:sharepoint:portal:profile:YourPropertyHere"/>
  7. Click OK to save the modified form.
  8. Test or publish your page as needed.

You should probably use Notepad or a similar text editor when editing the properties as some of the code that SharePoint spits out is quite messy.

EDIT: You need to modify both the search page (people.aspx) as well as the result page (peopleresults.aspx) if you want consistency in the search options.

Let me know if you have any problems with this and I'll do my best to help you out.

Published Nov 28 2007, 05:56 PM by MartinNr5
Filed under: , ,

Comments

 

David Piscopo said:

Hi

When trying to add an extra search option eg. Department

<Property Name="Department" ManagedName="Department" ProfileURI="urn:schemas-microsoft-com:sharepoint:portal:profile:Department"/>

I get an error from the web part:

Cannot save the property settings for this Web Part. One or more errors have occurred. See below for details.

Properties: An error has occurred.

Any ideas on what I am doing wrong.

Regards

David Piscopo

January 9, 2008 7:54 PM
 

MartinNr5 said:

Hi David.

I don't have access to the Properties code right now so the only things I can think of is that you're trying to add a property that already exists in the list or that the property isn't called "Department" in the property database.

Use the admin interface and manage your custom properties to see the actual name of the property, just not the display name.

I'll try and take a look at this when I get a chance.

January 10, 2008 12:13 PM
 

David Piscopo said:

Thanks for that.  I feel a little bit like a knob, in that I did not check to see if Department was not already included (which it was).  I have added my custom property (which show up in the people profile properties).  No error but it is not returning any results currently.  I will do a bit digging around.

January 13, 2008 7:47 PM
 

MartinNr5 said:

No worries, I did the same thing as well. :)

Post another comment if you have further questions or if you solve your problem.

January 14, 2008 8:48 AM
 

Rany said:

Hi,

I was wondering if you can have a pre defined list for the department search field although the department field is being aggregated from AD.

Thanks

April 14, 2008 9:29 PM
 

MartinNr5 said:

Hi Rany.

My first question is why you'd want to do this. If the items you get back from your AD isn't correct then you'd really need to clean up the information in the AD.

Otherwise I see no problem with you defining custom entries.

Unfortunately I don't know how to do it though, I'm not that good of a developer.

Best of luck and thanks for reading my blog!

April 15, 2008 12:45 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts