B i t s O f S h a r e P o i n t C o n s u l t i n g L L C > ExamplePoint > Site > ListSearchII  

Web Part Page Title Bar image
List Search II

 Examples

Expand/Collapse M E N U (click) : Examples ‎(21)
List Search - Configuration
Overview Here you can change the location of the search box and add comments that the enduser can see.
OPTIONS
Option Search Results Location
Value http://www.bitsofsharepoint.com/ExamplePoint/Site/ListSearchII.aspx
Help Copy the URL of the search page created in a dataview for the results.
Option Search Box Location
Value center
Help left, center, or right. You can set where the filter box is displayed by entering in either left, center or right.
Option Search Title
Value Example List Search
Help Add a title to the search to give the end user an idea of what list they are seaching.
Option jQuery File
Value http://code.jquery.com/jquery-latest.js
Help Only change this option if you want to use a local copy of the jQuery file.
---- Change only the gray boxes on this page. ----

Please do not Edit, Change or Add any information below this line.


 Examples List

URLNotesCategoryRank

 Overview

UPDATE: 11/29/2010

An updated version has been released.  This version adds the search term added to the search box after a serach is completed.

You can get the version 2.0 here:

 http://www.bitsofsharepoint.com/ExamplePoint/CodeExamples/Search_List.dwp

Overview 

A while back I create a solution that would filter a list by the metadata, but would only do this for items and metadata viewable in the current list view.  Here are the original articles:

Thanks to all the good feedback and suggestions I have created another solution that will allow you to search any list by its metadata and will search ALL items visible or not.  Another feature I have added into this solution is that it can be placed on any pages and when the person searches it will taken them to results page. 

In order to do this we will need to have access to SharePoint designer and have permissions to edit with SharePoint designer.  SharePoint designer will be used to create a Data View Web Part where results will be displayed.

There are two main steps to create this search.

  1. Create a Search Results page.
  2. Add the Search Web Part to any page.

Let’s go over the process of creating a search page.

Create a Web Part Page.

Next edit it in SharePoint Designer.

Now add a Data View Web Part to a Web Part Zone.  To do this you will need to select the list or library from the Data Source Library.  The list or library you choose will be the one that is search with this solution.

image

Then select the what columns want to show. Also add them as a Multiple Item View.

image

When you save the file you will get a warning, don’t worry go ahead and say yes.

image

Next you will customize how the list is filtered.

image

Choose what fields you will filter on or have the search look through.

image

For the comparison make sure you select contains so that it is not an exact match.

image

Next for Value your are going to select Create a New Parameter.

image

Complete the parameter with the following:

  • Name: Search
  • Parameter Source: Query String (this is how it looks at the URL for the search criteria)
  • Query String Variable: Search

image

For each field/column that you want to search add another to the list and make sure the And/Or is set to Or.

image

When you click OK your list of items will disappear, but that is OK and is expected.

image

You are now done with the first major part.  If you want to customize the list more, feel free to do so.  To customize the Data View web part that has nothing showing just check the box under “Common Data View Tasks” called “Show with sample data”.

The last part is to load the Search Web Part.  This web part is one that I created and will need to be downloaded placed on any page of your SharePoint site.  I would add this to the Search Results page as well.

Search_List: http://www.bitsofsharepoint.com/ExamplePoint/CodeExamples/Search_List.dwp

Next edit the Web Part with the Rich Text Editor and change the following:

  • Search Results Location:  This should be the full URL of where the Search Results page you created with the Data View Web Part is.
  • Search Box Location: Designate if it will be on the left, center or right.
  • Search Title:  Name your search so that your end users know what they are searching.

image

Then save the changes and you should be able to search your list and view the results.

Here you can find a working example: List and Document Library Search