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:
I saved this as a public filter.
“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.
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.
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.