How to: Apply a predefined filter on page load or create a default filter

Applies to SharePoint List Filter Web Part.

In this post I will describe how to apply a predefined filter on page load or in other words how to configure a default filter for the SharePoint List Filter Web Part.

The List Filter Web Part enables you to save current filter settings for future use (Predefined filters/Save filter as private or public).

In this example I saved the following filter criteria for a document library:

  • A document contains the keyword “Calendar” AND
  • was created this year (Year to date).

I saved this as a public filter.

Predefined Filters

“Manage Filters” in the Predefined Filters menu opens a view that shows all predefined filters. For the following screenshot I modified the view and added the columns ID and Query.

Predefined Filters List

The ID is the important value here. 1 in this case.

If I go back to the Filter Page and append ?FilterID=1 to the URL (?FilterID=[ID]) the predefined filter is applied on page load.

Apply Predefined Filter

You can use this functionality to create a default filter if you change the URL of a navigation item and append this FilterID query string parameter.

Want to try it out? A free fully functional 30-day trial version is available. Click on “Download trial” on the Filter Web Part Details Page.