SharePoint List Filter Web Part Configuration

On this page we will show you how to configure the List Filter Web Part. Below you can see a few examples of what the results look like.

Filter web part

For installation instructions please refer to the SharePoint List Filter Web Part Installation Guide.

Activate the feature

To activate the feature you first need to go to your site’s Site settings.

Site settings

Then select Site collection features.

Site collection features

On this page you can activate and deactivate your site collection’s features. Scroll down to the Sapiens.at.SharePoint List Filter Web Part 14.0/15.0 and click on Activate.

Activate feature

This will also activate the Sapiens.at.SharePoint Scriptloader 14.0/15.0 feature. The List Filter Web Part requires some scripts (jQuery and jQueryUI) to be loaded. If these files conflict with files you load from another solution, you can deactivate the feature or…

Deactivate scriptloader

go to Site settings then Sapiens.at.SharePoint Script Loader

Script loader

and configure which jQuery files need to be loaded. Please note that the List Filter Web Part requires jQuery 1.6.2 or higher.

Client scripts

Add the Web Part to a page

To add the Web Part to a page, go to Edit page.

Edit page

Then click on Add a Web Part.

Add a web part

Select the sapiens.at category and then Sapiens.at.SharePoint List Filter Web Part, then click on Add.

Add web part

Configure the Web Part

Once you have added the Web Part to your page, you then need to configure how you want it to operate. To get to the List Filter Web Part settings, click on Edit page.

Edit page

Then select Edit Web Part from the drop down menu on the List Filter Web Part.

Edit web part

On the right hand side you will now see the options for configuring the List Filter Web Part.

Select List View Web Part

Here you can select the List View Web Part(s) from this page you wish to filter. You can select more than one List View Web Part if you wish. The “Display search scope” option allows you to give the users the option to select from the List View Web Parts you have selected.

If you do not want to display results when initially loading the page, you can by selecting the option under “Don’t display results on initial load”. Selecting this option can significantly improve performance.

Select list view web part

The keyword search can be used in two ways: by using the “search” option, or by using the “list queries” option.

The “search” option allows you to search documents and attachments with SharePoint Server Search or Search Server using complex keyword queries, such as AND and OR, and wildcards. If you select this option you must configure the maximum number of rows for search results. This value must be between 500 and 10,000. If the number of items returned exceeds the configured limit, a message will be displayed to the user.

Please note that the maximum number of rows for search results can have a significant impact on the filter’s performance. If you are experiencing long waits (more than a few seconds) when filtering, consider decreasing the maximum number of rows for search results.

Use search

Use list queries

The “list queries” option does not search documents and attachments. When using this option you must specify which fields you want to query. You should only choose the fields you actually need to search, as the number of fields selected will affect the filter’s performance.

Use list queries

Filter details

The filter details section is where you can adjust options to refine your search, customize its appearance and configure the startup settings for the Web Part.

The List Filter Web Part uses four different controls to filter the list: a date range picker (used for date fields), a text box (for wildcard searches), a dropdown (used to select one value) and a multi select control (used to select more than one value).

These controls are usually filled with values from items in the configured view. However, if you configure the List Filter Web Part to start with empty filters or have filters containing all possible values, the view doesn’t need to be queried. This significantly improves the filter’s performance, especially when used on large lists or libraries.

The “Start with keyword search” option allows you to enter a keyword, select a date or choose a value from a filter containing all possible values. This is then used to populate the filter controls with values from the library or list.

The “All possible values” option includes values already defined in other sources, like choices, lookups, managed metadata and people and groups. Please note that loading all possible values from sources containing large numbers of values can impact the performance.

These two options can be combined to make a total of four ways to configure the List Filter Web Part.

1. Populate choices with values from the view

Do not select the “Start with keyword search” option and do not select the “All possible values option”.

In this case the choices are filled with values which exist in the view. If you then apply a filter, the choices are only filled with values from the result set. This option is not recommended for large lists, as all the items in the view have to be queried.

Option 1

This picture shows what the List Filter Web Part looks like using this option on the initial load. All values which are contained in the list to be filtered are displayed.

Option 1 initial load

And here is what it looks like after filtering. All values remaining in the list after filtering are displayed.

Option 1 after filtering

Select the “Start with keyword search” option and do not select the “All possible values option”.

In this case the choices are empty until you search for a keyword. After your first search the choices are populated with values from the result set. This option is recommended if you primarily want to use the keyword search. This option is suitable for use on large lists.

Option 2

This picture shows what the List Filter Web Part looks like using this option on the initial load. No values are displayed and you must use the keyword search in order to populate the dropdown with values.

Option 2 initial load

And here is what it looks like after filtering. All values remaining in the list after filtering are displayed.

Option 2 after filtering

3. Start with keyword search and view all possible values on initial load

Select the “Start with keyword search” option and select the “All possible values” option.

In this case the choices are populated with all possible values (from other sources, such as choices, lookup lists, managed metadata and people or groups) on the initial load. Once a filter is applied (keyword search or filter) the choices are filled with values from the result set. The option is suitable for use on large lists, but please note that loading definitions from big sources (e.g. a large lookup list) can affect the filter’s performance.

Option 3

This picture shows what the List Filter Web Part looks like using this option on the initial load. All potential values from the field, whether they can be found in the list or not, are displayed.

Option 3 initial load

And here is what it looks like after filtering. All values remaining in the list after filtering are displayed.

Option 3 after filtering

4. Always populate all possible values

Do not select the “Start with keyword search” option and select the “All possible values” option.

In this case the choices are always populated with all possible values (from other sources, such as choices, lookup lists, managed metadata and people or groups). This option has the advantage that if a lot of items are returned after the first filter is applied, there is no need to query them. This option is recommended for use on large lists, but please note that loading definitions from big sources (e.g. a large lookup list) can affect the filter’s performance.

Option 4

This picture shows what the List Filter Web Part looks like using this option on the initial load. All potential values from the field, whether they can be found in the list or not, are displayed.

Option 4 initial load

And here is what it looks like after filtering. All potential values are still displayed, even the ones which cannot be found in the list after filtering.

Option 4 after filtering

Maximum number of items

This option sets the maximum number of items in the multi select control. It has an impact on the rendering performance of the List Filter Web Part, as does the browser you use. If the number of filter values exceeds this limit, a single select dropdown will be displayed instead.

Maximum number of items

Include descendants

This option will include descendants in your search. However, this option only applies to managed metadata fields with the “All possible values” option selected. If selected, the entire managed metadata tree will be displayed.

Include descendants

Distinct lookup values

This option allows you to group multiple occurrences of a specific value into one option in the filter dropdown, whereas otherwise you will see all occurrences of this value. For more on this feature, see this blog post.

Distinct lookup values

Number of columns

This option allows you to specify the number of columns in which the filter details should be displayed.

Number of columns

Expand filter details

This option displays the expanded filter view by default when loading the page.

Expand filter details

Expand filter details view

Display ‘Search now’ button

This option displays a button to apply your filters instead of filtering immediately when something is selected in the filter control (date range picker, dropdown or multi select control).

Display search now button

Search now button

Display number of items

This option displays the total number of items and the number of items in the result set. Depending on the number of items, this can affect the filter’s performance.

Display number of items

Number of items

Toolbar

Display filter menu

This option displays a menu to save filter settings. This can be used to create reusable private and public filters.

Display filter menu

Filter menu

Display print button

This option displays a print button which opens the List Filter Web Part and all results in a new window.

Display print button

Print button

Display ‘Export to Excel’ button

This option displays the ‘Export to Excel’ button which opens the results in an Excel file.

Display export to excel button

Export to excel button

Expand/Collapse

This option allows you to choose whether the expand/collapse function should be made available.

Expand collapse

Expand collapse view

Performance

This option displays performance notifications for administrators. It is recommended that this option is selected for set up and during performance tests. The notifications allow administrators to monitor the execution of searches and queries, as well as the total execution time of the Web Part.

Performance

Performance view

Apply settings from existing Web Part

If your page already contains an older version the the List Filter Web Part, you can also apply your settings to the updated version.

Apply settings

The basic design of the search and filter process

In order to configure the List Filter Web Part to better suit your needs, it is first necessary to understand how it works. When using SharePoint Server Search and Search Server Express, the List Filter Web Part is optimized using a two-step process, together with additional options.

Step 1

When using a specific keyword, SharePoint Server Search is always configured fast to start with. If a keyword or phrase is entered in the search text field, the Web Part will query the configured search engine (and cache the results for a few minutes) and retrieve the results delivered.

Here the Max. number of rows for search results parameter becomes very important, as it can significantly affect the performance of the search. It can contain values between 500 and 10,000, but you should figure out the optimum value for your specific list. A value of 10,000 means that a maximum of 10,000 rows of data will be returned from your search query. However, in this case the filter will take a considerable amount of time (up to 3 seconds on our test systems for a list with over 100,000 items). Here are some tips on how to find the optimum value for the Max. number of rows for search results parameter:

  • Teach users to be specific!
  • The smaller the configured value the better the performance will be with ambiguous keywords.
  • The smaller the configured value the more often users will receive a notification message when entering unspecific keywords. This is an indication that there might be more items than the configured limit allows.
  • If you have set the List View Threshold parameter to 2,000 items, we would recommend setting the maximum number of rows for search results parameter to a value less than 2,000.

Step 2

The Web Part queries the list items contained in search results. It then takes the search results and subsequently narrows them down to the items to be filtered. This means that only those items returned by the search will be able to be filtered.

This is where the List View Threshold parameter in your web application’s resource settings comes into play. This value limits the maximum number of items the Filter Web Part will return. The Web Part will notify the user that the list view threshold limits the number of items (and values in filters) displayed and that there might be more items matching the criteria.