Filter Web Parts connect to Web Parts containing one or more sets of data to change the view of the data. The filter Web part can be visible on the page, to ask for user input, such as a date or text, or they can be invisible, as is the case with the Current User filter, which filters data based on the user who is logged on to the computer.
In this article
Some filter Web Parts filter data automatically and other filters enable people viewing a page to enter values or select values from a list. Filter Web parts are designed to work with Microsoft SQL Server 2005 Analysis Services data, Microsoft Office SharePoint Server 2007SharePoint lists, data that resides in the Business Data Catalog, or data in a workbook loaded into the Microsoft Office Excel Web Access Web Part.
Ways to use filters
The following two scenarios illustrate how Office SharePoint Server 2007 filters can be useful:
- Jeff Smith wants to communicate the revenue generated by a product on a monthly basis. Historically, Jeff would view a SQL Server 2005 Analysis Services report produced by the Contoso Sales application, and then copy and paste the information into an e-mail message to distribute it to his team. Jeff adds the same SQL Server 2005 Analysis Services report to his dashboard along with a report that shows customer complaints by product on a monthly basis.
Jeff adds a filter Web Part so that dashboard users can pick the product they are interested in. He sets up the filter to show a list of products and connects the filter to the new customer complaints by product monthly report and the existing product revenue by month report. When his team members view the page, they can see data on the default product Jeff set for the reports, but they can also pick any product from a list. Choosing a different product changes all of the data in each of the connected Web Parts.
- Christina Lee, a regional sales manager, uses her division's dashboard to review monthly data. She notices that the customer satisfaction key performance indicator (KPI) is yellow, indicating it is in warning mode. She can click the indicator to go to a Web page that displays the indicator, an explanation of why it is yellow and three reports that provide additional insight.
All of the elements on the page are filtered specifically for Christina’s division. Other sales managers in Christina's company can view the same dashboard, but their view is filtered, and therefore customize, for their own division.
Top of Page
Types of filters
The type of filter Web Parts you use and how you use them depends on your data source, the type of interaction you want from the user, the results you want. There are nine filters provided with Office SharePoint Server 2007 along with the Filter Actions Web Part, which is a filter button you can add to a page, so that users can choose when to refresh the data on the page.
The following filter Web Parts allow Web Part page users to manually specify values:
||You can provide a default or leave the value blank. Users can pick a date from a drop-down calendar or enter the m/d/yyyy value into the box displayed on the Web Part page.
|Query String (URL) Filter
||Allows filters to be added to a URL when adding a link on a different page to the dashboard.
||You can require users enter text and/or provide a default.
The following filter Web Parts allow Web Part page users to pick from a list of values:
||The choice filter allows you to specify values in the tool pane of the Web Part. Users select one of the values from a drop-down menu that appears on the Web Part page.
|Business Data Catalog Filter
This Web Part allows you to choose one entity from the Business Data Catalog and then specify Value column. In addition, you can add a Description column.
For example, if the entity is Products the AdventureWorks application and the Value column could be Name. If you add a Description column, the end result on the Web Part page is a picker that allows the user to search for products by Description, Key, or Name by using a drop-down menu.
|SharePoint List Filter
||When you configure this filter, you point to a SharePoint list and the specify the value of a column, such as title, description, date or document type. Users can browse to the list and then choose from the type of item you specify.
|SQL Server 2005 Analysis Services Filter
||This filter allows you to select a data connection from a Web Part on the current Web Part page or from a SharePoint Data Connection library or Office Data Connection library. You then specify a dimension and hierarchy (and something displays on the Web Part page for the user.)
These filter Web Parts automatically filter the Web Part page:
|Current User Filter
||Provides either the current user’s login name or a selected SharePoint profile property. Provides a selected query string parameter.
|Query String (URL) Filter
||This filter passes a fixed value(s) that you configure in the tool pane.
|Page Field Filter
||Provides the value of a column on the list row that the current page is associated with.
Top of Page
There are three steps to using a filter:
- Adding it to the Web Part page
- Configuring the filter settings
- (Optionally) Connecting the filter to other Web Parts on the page
Add the filter to the Web Part page
Adding a filter Web Part to a Web Part page is similar to adding any other Web Part to a page. When using a filter that will request user input, consider the placement of the Web Part on the page. In addition, the name that you specify for the filter in the tool pane serves as the description on the page for the text box or menu.
For more information about adding a Web Part, see Customize pages on a site by adding Web Parts.
Configure the filter settings
You set up the filter by using the Web Part tool pane. Each tool pane has different options depending on the type of filter you are setting up.
For more information about configuing the filter settings, see the following articles:
Connect a Filter Web Part to a List View Web Part
Connect a Filter Web Part to a Data View Web Part
Connect the filter to other Web Parts on the page
The filter Web Part you use may need to be connected to another Web Part on the page. This might be the case when you use filters with Excel Web Access Web Parts. You can connect filter Web Parts that are either visible or invisible to the user. A visible filter Web Part may request input from the page viewer, such as selecting from a product list. An invisible filter Web Part, such as the Current User filter, automatically filters the data it is connected to based on the person who is logged on to the computer.
When a filter is available to be connected to another Web Part on the page, the Connections menu is visible from the menu. The connection between the filter Web Part and another Web Part on the page can be initiated from either direction.
For more information about connecting a filter Web part to an Excel Web Access Web Part, see Connect a List View Web Part to Excel Web Access