Skip to main content
< All Articles

How to connect lists and libraries via dynamic filtering in SharePoint Online

Posted on January 27, 2023
SharePoint

Today I want to describe a feature in modern SharePoint that allows you to connect two lists and libraries and dynamically filter them based on the value selected from one of the lists or libraries. I know this all sounds a bit confusing, so let Dr. Zelfond explain this.

Use Case

Perhaps it first makes sense to explain what I am talking about. Say you have two lists. One is a list of clients with the corresponding client information (client name, address, status, etc.).

Dynamicallyconnectlistslibrariessharepoint1

Another list is a list of contacts for each client (client name, first and last name of contact, email address, and phone number).

Dynamicallyconnectlistslibrariessharepoint2

I want to be able to view both lists at once on a SharePoint page, but the way I want this to work, I want to select a client name from the Clients list, and I want the second list to automatically filter the contacts based on client name selected from the first one. Thanks to the dynamic filtering option we now got in SharePoint Online, we can do this. Let me explain.

How to connect and dynamically filter lists and libraries in SharePoint Online

  1. Edit the Page and add both lists to the page, side-by-sideDynamicallyconnectlistslibrariessharepoint3
  2. Once added, it should look like thisconnect lists and libraries
  3. Edit the page again, and select the list you want to be filtered based on the choice made in another list (in my case, Contacts). Click the pencil icon.Dynamicallyconnectlistslibrariessharepoint5
  4. Next, enable the Dynamic filtering toggle. You will see several drop-downs appearing underneath. In the first drop-down, choose the column in the list you want automatically filtered. In my case, I want my Contacts list to be filtered by Company Name. Next, choose the list or library where you will filter the information. In my case, it is a Clients list. Finally, select a column that you will filter in that second list. In my case, it is Client Name. So essentially, the column in the first drop-down and the column in the third drop-down have to match in terms of the information they contain (Company Name = Client Name). Click Apply.connect lists and libraries
  5. Republish the page

How dynamic filtering works

Now that we connected two lists via dynamic filtering let’s see how it works. Click on any row from List 1, and you will notice that List 2 is filtered based on the selection made.

Dynamicallyconnectlistslibrariessharepoint7

Use Cases for using dynamic filtering

Dynamically connect a list to a list

You can quickly build a quick CRM within SharePoint, by connecting a list of clients with a list of contacts (just as I described above) and even deals/opportunities all presented on the same page.

Dynamicallyconnectlistslibrariessharepoint4

Dynamically connect a list to a library

You can maintain a list of clients and then have a document library with, say, contracts, all tagged against a given client name, and then have those contracts filtered automatically based on a client selected from the list.

connect lists and libraries

Notes

  • You can dynamically connect two lists or two libraries or a list and a library
  • The column headings do not need to match. For example, I can have a Client Name heading in list/library 1 and a Customer Name in list/library 2. The main thing is that the choices/information in those columns must match!
  • Related to the above, the text/choices need to match 100% for this work. For example, if in list 1 you spelled out ABC Inc. and in list 2 you called the same company ABC, Inc. (with a coma), those do not match, and dynamic filtering won’t pick it up.

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?