Filtering Lists and Libraries in MOSS

The filter web parts included in MOSS limit what is shown on a page. You can use them in three main ways:

  • Show personalized results based on the current user.

  • Allow users to limit what is shown by entering their own filter criteria.

  • Automate what is shown based on a passed-in query string.

The following sections demonstrate each of these techniques using the filter web parts. These web parts are available only in MOSS.

Filtering Based on the Current User

The Current User Filter web part is similar to using [Me] to filter a view of a list. The web part filter can apply to multiple items on a page, however, which is easier than creating individual views.

To see how that works:

  1. Navigate to a sample site containing a document library and a task list.

  2. Create a test page, and add the document library and task list to it as web parts.

  3. Add the Current User Filter web part to the page.

  4. On the web part toolbar, click edit → Connections → Send Filter Values To → Tasks. SharePoint displays the Configure Connections dialog box.

  5. Select the Consumer Field Name Assigned To and click Finish. SharePoint applies the filter to the Tasks list.

  6. Repeat step 4 for the document library.

  7. Select Consumer Field Name: Modified By in the Configure Connections dialog box and click Finish. SharePoint applies the filter to the document library web part.

Figure 6-10 shows the Current User Filter web part in action.

Figure 6-10. Filtering multiple web parts on a page by current user

The filter ...

Get Essential SharePoint 2007, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.