In this Connected Web Parts in SharePoint Online tutorial, we will learn how we can connect various web parts in the modern SharePoint online page in order to better manage and display the list or library data, we will focus on the “Top 5 Connected Web Parts in SharePoint Online – O365”
Key Highlights – Connected Web Parts in SharePoint Online
- Introduction
- Prerequisites
- Connect a List properties web part to a List web part(show selected item)
- Connect a File viewer web part to a Document library web part(show selected file)
- Show a selected image
- Show a selected YouTube video
- Show a selected location
- Summarize – what we had here.
Introduction – Connected Web Parts in SharePoint Online
As we know Microsoft releases new changes every month with respect to office 365. So as per SharePoint Roadmap Pitstop: April 2019 release, we can connect various types of web parts to each other on the SharePoint modern page, here in this article I will focus on how can show list or library data in various ways.
Prerequisites – Connected Web Parts in SharePoint Online
- 1. Developers/users should know how to add and configure the web part in SharePoint Online.
- 2. Upload a few documents to the default “Documents” library.
- 3. Create a “Customers” list with the below columns.
- 3.1. Title – rename to “Customer ID”
- 3.2. Customer Name
- 3.3. Customer City
- 3.4. Phone Number
- 3.5. Email ID
Notes:
- 1. Add a few test items to the “Customers” list.
- 4. Create a “Test Video List” list with the below columns:
- 4.1 Title (no need to create – by default list will have this column).
- 4.2 Video ID
Notes:
- Add a few items with Video ID (Video ID should be YouTube video id, you will get it from video URL example: https://www.youtube.com/watch?v=dvFbVPDQYyk)
5. Create a “Test Image List” list with the below columns: 5.1 Title (no need to create – by default list will have this column). 5.2 Image Url
Note:
- Add a few items to the list with the Image Url attribute.
6. Create a “Test Location” list with the below columns: 6.1 Title (no need to create – by default list will have this column). 6.2 longitude 6.3 latitude
Notes:
- 1. Add a few items to the list with longitude and latitude attributes.
- 2. Get the longitude and latitude for a location from google. 7. Test Web Part Page.
Note:
- All columns are “Single line of text” type.
Connect a List properties web part to a List web part(show selected item) – Connected Web Parts in SharePoint Online
Using this connection, we can select a particular item from a list and can display the selected item in the corresponding web part, and can do the update operation. We’ll see how this can be implemented.
Navigate to your TestWebPartPage and add the list web part, to do this follow the below steps:
Step 1:

Step 2:

Step 3:
Edit the “List” web part.
Once the above List web part is added, edit the web part property to select the “Customers” list as below.

Then we’ll see the below screen:
Step 4:
Following the above steps, add another web part type of “List properties” as like below:

Step 5: Edit the “List properties” web part.
Select the “Customers” list and leave the rest of all settings as is, like below:

Step 6: We’ll see the below screen.

Step 7:
To verify the connection select any item from the list web part that will be displayed in the “List properties” web part as below.

Connect a File viewer web part to a Document library web part(show selected file) – Connected Web Parts in SharePoint Online
Using this connection we can select a particular file in the “List” web part and that selected file will be displayed in the “List properties” web part. To do this, follow the below steps:
Using the above “Customers” list web part technique add the below two web parts to the page.
- Document Library web part (as a sample select default “Documents” library)
- File viewer and configure the connection.
Step 1:
Add a “Document library” web part and select the default “Documents” library as below:

Step 2:
Add File Viewer Web Part, and while adding the “File Viewer” web part we’ll get the below window, click on the”Cancel” button.

Step 3:
In File viewer web part property select “Documents” library from connecting to source drop-down list as like below:

Step 4:
Now we can see the below screen.

Step 5:
To verify the connection select any document from the “Document library” web part that will be displayed in the “File viewer” web part as below.

Show a selected image – Connected Web Parts in SharePoint Online
Using this connection we can display the selected image in the “Embed” web part. To do this follow the below steps:
Step 1:
Using the previous techniques, add a List web part and choose the list – “Test Image List” as like below:

Step 2:
Add an Embed web part and click on connect to source thru the edit web part.

Note:
In the above embed code box, update with the below text where “$ImageUrl” is a variable which represents the column name of the “Test Image List”
Step 3:
Then we can see the below screen.

Test 4:
To verify the connection select any image from the “List” web part that will be displayed in the “Embed” web part as below.

Show a selected YouTube video – Connected Web Parts in SharePoint Online
Using this connection we can display the selected video in the “Embed” web part. To do this follow the below steps:
Add the below two web parts as like the above image web part:
- List the web part and choose the list “Test Video List”
- Add an Embed web part.
Step 1 :
Adding List Web Part with “Test Video List”:

Step 2:
Adding an Embed web part and select “Test Video List” from the “connect to source” drop-down list as below:

Note:
Fill the above embed code box with the below content where $VideoID is a variable that represents the VideoID column in “Test Video List”.
“https://www.youtube.com/watch?v=%5B$VideoID%5D”
Step 3:
Then we’ll see the below screen.

Step 4:
To verify the connection select any video from the “List” web part that will be displayed in the “Embed” web part as below.

Show a selected location – Connected Web Parts in SharePoint Online
Using this connection we can display the selected location in the “Embed” web part. To do this follow the below steps:
Add the below two web parts as like the above image web part:
- List the web part and choose the list “Test Location”
- Add an Embed web part.
Step 1:
Adding a List Web Part with “Test Location” as below.

Step 2:
Adding an Embed web part and select “Test Location” from connecting to the source drop-down list as below:

Note:
In the above embed code box copy the below content where $latitude and ~ $longitude are two variables that represent two columns in the “Test Location” list.
Step 2:
To verify the connection select any location from the “List” web part that will be displayed in the “Embed” web part as below.

Summary- Connected Web Parts in SharePoint Online
Thus, we have learned the below concepts in this tutorial on how we can connect two web parts two display the selected different types of SharePoint objects.
- Connect a List properties web part to a List web part(show selected item)
- Connect a File viewer web part to a Document library web part(show selected file)
- Show a selected image
- Show a selected YouTube video
- Show a selected location
References – Connected Web Parts in SharePoint Online
https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/SharePoint-Roadmap-Pitstop-April-2019/ba-p/504656
See Also: SharePoint online tutorial for developers
You may also like the below SharePoint Online tutorials:
- Office 365: Getting started with SharePoint PnP PowerShell – installation
- In 2 steps convert a classic SharePoint page to modern using PnP
- Office 365: Retrieve hub sites and associated sites using PnP Powershell
- Create a modern team site using PnP PowerShell in SharePoint
- In 4 steps access SharePoint online data using postman tool
- SharePoint admin center: Learn SharePoint online administration in an hour – step by step
- SharePoint REST API: GET vs POST vs PUT vs DELETE vs PATCH
- Office 365: Understanding the hub site in SharePoint online
