Skip Ribbon Commands
Skip to main content
Sign In

Shared Filter web part configuration

Shared Filter web part configuration


The Data View Shared Filter web part is used to filter multiple Data View web parts that you have in your modern SharePoint page.
After you added and configured the Data View web part/s in your modern page, add the Shared Filter web part to the page.
You will see its default display showing one filter section including a single text search filter:

 
Configuration of the Shared Filter and connecting it to the Data View web part/s in the page includes the following steps:
  1. Configure mapped columns
    Mapped columns are the "glue" which connects every filter to one or more Data View web parts' data source columns.  

  2. Create filter section/s
    The Shared Filter web part includes one or more filter sections, each section displays one or more filters.
    This way you can display the filters in a required layout.

  3. Add filters and connect each to mapped columns
    A filter is a control such as textbox, drop-down etc. used by end-users to filter the dislayed data by Data View web parts on the page.
    When adding a filter you connect it to a mapped column which you created in step
    1. 1 above.


  4. Map the custom mapped columns to Data View web parts' data source columns
    After you have your filters displayd and connected to mapped columns, you need to configure each of the Data View web parts' data source, and map the columns you want to filter to their matching custom mapped columns.
The following sections describe each of the configuration steps above in details.

Configure mapped columns

To see existing/create new custom mapped columns click the "Column mappings" toolbar button:
The "Column mappings" popup will appear, showing all existing mapped columns:
   
The mapped columns are organized by the following categories:
  • All columns - displays all existing mapped columns
  • Custom - these are custom mapped columns that you create if needed
  • Built in - these are SharePoint system mapped columns that are available in all SharePoint lists/libraries
  • Calendar - mapped columns that are available in KWizCom Data View Calendar data source
  • Org. Chart - mapped columns that are available in KWizCom Data Org. Chart data source

So when do you need to create custom mapped columns?
When you need to filter your target Data View web parts by other columns which do not exist in the target Data View web parts' data sources.
example:
If you want to filter several Data View web parts on the page by a "Created" or "Created By" filters, you don't need to create any custom mapped columns since these 2 mentioned mapped columns exist in all Data View web parts data sources.
Additinal detailed examples are available in TBD
To create a new custom mapped column, click "Add custom column".
The "Configure custom column" popup will appear, requiring to update the following properties: 
  • Column id
    provide a clear unique name.

  • Description
    this will help other admins undersand the purpose of this mapped column.

  • Allow mapping to more than one column
    Check this checkbox if you plan to connect multiple columns in the filtered Data View web part's data source.
    example:
    You have a Data View web part displaying a table that includes "phone" and "cell phone" columns, and you want to be able to filter both these columns with a single "Phone" filter.
    In this case you will create a "Phone" mapped column, and check the "Allow mapping to more than one column" property.

Create filter section/s

When you add the Shared Filter web part to the page, a default filter section is created (highlighted in the screenshot below), including a text search filter:
 
You can provide the filter section a title, and then add multiple filters to it by clicking the "+ Add filter" button.
To configure the filter section properties, click the gear icon in its top-right corner:
  • Filter captions
    Choose how you want filter captions to appear: above the filter, besides the filter or as a placeholder (inside the filter)

  • Filter settings
    When you have more than one filter displayed in the filter section, select the resulting filter operation:
    - Satisfy all filters (AND operation between all filters)
    - Satisfy any filter (OR operation between all filters)

  • Delete section
    Delete the section and its included filters

  • Hidden
    You can hide a filter section from end-users.
    This is useful when you want to apply an admin-saved filter, and hide the applied filters from end-users so they won't be able to change it.

You can add additional filter sections above/below an existing section by clicking the "add section" icon .
Multiple filter sections are needed when you want to seperate the displayed filters to multiple groups/sections, displayed one below the other.



Add filters and connect each to mapped columns

To add a filter click the "+ Add filter" button:
The "Configure new filter" popup will appear, displaying the following properties:
 
Property Description
Columns to search in
Select a mapped column to which you want to connect the filter.
Select "All columns" if you want to search all columns in the connected Data View web parts.
Caption The filter's displayed caption.
Minimum width
Optional. Setup a minimum width if you require the field not to narrow down below a minimum width, as part of the responsive UI behavior.
Hide all items when this filter is empty   Check this property if you want the connected Data View web parts to show no data if this filter is empty.
(so show only data which is filtered by this filter).
Control type
Select the control that will be used for this filter:
  • Date
  • Dropdown
  • Number
  • Text box (default)
  • User
  • Yes/No
When selecting the Dropdown control type, additional settings appear enabling you to populate the Dropdown control options from one of the following sources:
  • Enter options - allows you to manually provide the Dropdown displayed options
  • List items - connect the Dropdown control to a selected SharePoint list and view
  • Choice field - get values from a selected list's choice column
Operator
Operator used to filter, by default it's "Equals".
IMPORTANT COMMENTS:
  • Depending on the control type, different operators are available.
  • When comparing strings, "equals" actually means "contains", so all items where the filtered column/s contain the searched string will appar.

 

 

 

Connect the Data View web parts to the Shared Filter web part

After we've configured the Shared Filter web part to display the filters we want, it's time to connect the Data View web parts that you want to be filtered by the Shared Filter.
By default, all Data View web parts in the page are connected to the Shared Filter web part.
If you do not want a Data View web part to be filtered by a Shared Filter on the page, switch to edit mode and click the "configure shared filter" button in that web part:
You will see the following settings page:
Use the "filter items using the shared filter" toggle to connect/dissconnect the web part to/from the Shared Filter on the page.

Map shared filters to web part datasource columns

The last setting left to configure is the mapping between each shared filter and the filtered web part's data source column. This step is required only when you have shared filters connected to custom columns. If the shared filters search all columns or connected to a column that is available in the target web part data source, then no mapping is required and filterring should work.
 
Example:  
In the following screenshot we have a Shared Filter web part with just one filter that is configured to search in all columns.
In this case no mapping is required to the filtered web parts' data source columns because the filtering will be done on all columns.
Below there are two Data View web parts: one configured to display a table and the other - to display a weekly calendar.
 

Searching for the string "22" in the Shared Filter will filter the two connected web parts below, by searching in all their data source columns:

 
As for filters that are connected to custom mapped columns:
You need to map these custom mapped columns to the Data View web part's data source columns.
 
example:
In the Shared Filter web part, we added a custom mapped columns called "Billable", and connected to it a Yes/No (checkbox) "Show billable items" filter:

  
We want this filter to be mapped to "IsPayment" column in the Milestones web part's data source, and to "Billable Milestone" column in the Team Calendar web part's data source.
To do that, switch to edit mode and open the Data View web part's Data source configuration page. Let's do it with the Milestone web part:
Click the "Configure data source" button:
In the data source configuration page, click the "Column mapping" tab for your data source:
Scroll down to display "Custom column mapping" section:
 
Each custom mapped column that was created in the Shared Filter web part appears under this section, named as "dvp_[custom mapped column name]".
You should map each custom mapped column to a data source column (the column that will be filtered by the custom mapped column).
In our example, we map the "Billable" custom mapped column to Milestone's web part's data source column called "IsPayment?":
 
We do the same with the Team Calendar web part, and map the "Billable" custom mapped column to the "Billable Milestone" column:
That's it, now both Data View web parts are connected to the "show billable items" filter:
 
 

Additional Shared Filter web part settings

While in edit mode, the Shared Filter web part includes the following additional settings:
  1. Show apply button
    This toggle button switches the web part between two modes of operation:
    - Immidiate (default): filterring is applied immediatelly when changing any filter in the web part
    - When clicking Apply: the web part displays Apply & Clear buttons, filterring is applied only when clicking "Apply".

  2. Show share link
    This toggle button shows/hides the "copy link" button (), enabling end-users to copy their current filter values. The button is dislayed only when at least one filter value is set/changed. 

  3. Save default filter ()
    While in edit mode, you can provide default values for selected filter and save these values as the default filter for all users.

  4. Preview ()
    Click to see how the web part will look like in View mode by end-users.

  5. About ()
    View version/license information

 
 

Created at 6/20/2021 4:23 PM by Nimrod Geva (UTC-05:00) Eastern Time (US and Canada)
Last modified at 9/12/2021 4:28 AM by Nimrod Geva (UTC-05:00) Eastern Time (US and Canada)
Total Views: 1125

Tags

Article Type: User-guide
Recent Discussions
There are no items to show in this view.