Wildcard People Search on MOSS 2007 – Adding Another Field
Written by Ramon Scott on July 31, 2008 – 7:22 pm -This is a follow-up to my original post forĀ a quick solution for a adding a web part to the home page that allows for searching for people using first, last or a combination of names. Wildcards are supported on either.
This version has been tweaked to add a select box that also lets a user choose a department to view or search within. You’ll have to hard-code your departments in. A fancier version might use an AJAX call to read from a list or something similar.
To use this, just add a content editor web part to the moss home page and paste the code below into the source view. The form will submit to the default people search results page.
Tags: MOSS, SharePoint, WSS
Posted in SharePoint, Web Technology | 6 Comments »

October 23rd, 2008 at 10:27 pm
Hi,
Does anyone know where the form searches for department? Is it in AD? My Site? I can’t find department column.
Thanks.
October 24th, 2008 at 12:01 pm
Hi Ramon,
I have added Department field and made it as a text box instead of dropdownlist but it only returns results if we provide the full department name.Its not doing the wild card search the same way its doing for first and last name. could you please show us how to do wild card search on other fields also like department.
October 26th, 2008 at 9:24 pm
Don’t worry, it’s from AD. However, for department / JobTitle I notice we can’t use WildCard. Anyone knows how to do this?
July 13th, 2009 at 12:10 pm
Works like a charm. I’ve also added fields for the department drop down and is works as advertised! Thank you for sharing your script with us.
November 16th, 2009 at 10:21 am
[...] 4. Hook in Wildcard People Search [...]
November 24th, 2009 at 5:01 pm
Thanks for sharing this code. Love your work. Cheers