How to filter SharePoint lists dynamically

SharePoint List web part available in modern SharePoint pages is provided with a filtering option that allows you to dynamically filter the data from one list using data stored in another list.

In this article I will show you how you can take advantage of this feature with, explaining all the steps using a predefined scenario to filter the company offices based on their location.

Filter SharePoint Lists dynamically

Environment: Before we jump into the lists web part configuration you must know the lists schemas so you can recreate them in your environment.

  • Title – Single line of text
  • City – Single line of text
  • Address – Multiple lines of text
  • Title – Single line of text
  • Photo – Image

  1. Start by adding two List web parts to a SharePoint page
    Filter SharePoint Lists dynamically
  2. In one of the web parts select the Office lists and in the other one select the Locations list
  3. Edit the web part showing the Office list and turn on the Dynamic filtering option
  4. Select City in the Column in Offices to filter
  5. Select Locations in the List or library containing the filter value
  6. Select Title in the Column containing the filter value
    In the following image you will notice that my title column has been renamed to City, this was made to make the relation between both lists easy to understand. If you don’t know how to rename the default title column have a look here.
    Filter SharePoint Lists dynamically
  7. Click Apply and save your page

In the following animation you can see how the Location list filters the data in the Offices list dynamically on click.

Filter SharePoint Lists dynamically

Note: The locations column is using the gallery view that was defined as the default view for the lists. To learn how to define the gallery view as default view in your lists have a look here.

Now that you understood how the dynamic filtering works, adjust the scenario to your requirements and start filtering the data in your lists.

No comments yet

Leave a Reply

I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.