Sharepoint Custom Search

geoffsweb used Ask the Experts™
I'm using Sharepoint, MOSS 2007 and Sharepoint Designer.

I've created a site that has a few custom forms (lists) used for collecting data from the users.  Is there a way to create a custom search page for the user to query the data that was entered.  I know that you can create custom views to organize, filter and order the data into the columns you want.  But the client wants a custom search page that allows them to pick specific criteria to search from to populate these views.  So on their search page, they'd have the drop downs to pick data from that was used on the form (list) page.  I'll attach a screen shot of a search page that I create on their current web page, but now we're migrating them to SharePoint and we're trying to emulate what they have now the best we can in SharePoint.  A push in the right direction and/or an article would be great!

Thanks! example of current search
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Based on your requirements i believe that you need to create a custom form similar to the one shared in the screenshot. I need few inputs from your end:
1. Are you going to search on one list or multiple lists?
2. If from one list, then you need to create dynamic CAML query to return results. You can do this with the help of CAML query builder and then adding the conditions dynamically to it and generate the query.

If you need help with dynamic CAML just let me know.



Yes, I'll only search from one list.  I have never heard of CAML.  I'll Google it now :)


So you have to create this page using custom code( CAML)? Sharepoint doesn't allow you to create a Search page where it allows you to select what form/list to use to create the search?

You could create a Search Scope to only return results from a particular list/library.  In conjunction with scopes, you could modify the search webpart and edit the XSLT to shape the results to your display requirements.

Info on creating Scopes:

Info on XSLT custom search results page:

Hi Geo,

Based on the UI you shared, i feel your form is similar to the once created with the help of Reporting services. You can create a user control using sharepoint object model and then deploy it using smart part. You need to add all the filters as controls on it, and generate a dynamic query with appending all the filter(if changed). Pass that query to return the list items.

Or if your filter parameters are static, you can create a custom form with html controls with static values. Add a search button which will pass the filter conditions in query string(add all the parameters irrespective of change in value)  Use the dataview webpart to retrieve list data and configure it to be filtered based on the query string parameters and there values.
NOTE: keep in mind that you will be able to pass maximum of 255 in query string(just check).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial