In alist relationship, information from one list (thesourcelist) is automatically shown in another list (thetarget list). List relationships let you join information from two lists and keep it consistent while people edit and delete list items.
Relationships help track and maintain information across multiple lists. Target list items can also link to and display multiple columns worth of information from the source list, and relationships can change what happens when an item is deleted (check out Deleting items with a relationship).
In this article
Getting started with list relationships
Unique columns
Adding a Lookup column to an existing list
Creating columns in the source list
Deleting items with a relationship
Managing list relationships when lists have many items
Getting started withlist relationships
To make a list relationship, you will need two lists: the source list and the target list. You should make the source list first.
In this example, we'll use a list of college courses as the source list, and a Reading list as the target list. The goal is to display a course name and course ID for every book on the Reading list without having to manually enter the information.
-
Make the source list. This list will have columns for all the information you will display on the target list later, as well as additional information for each list item for our records. For example, we will make a Course list with the columns: Course Name (title), Course ID (single line text), Class Time (date and time), and Semester Length (choice, with two options: full, half).
-
Fill out the source list. Make list items for all the information you will display on the target list later. For the example, we will add three courses: Intermediate Computer Science, Intro to Computer Science, and Machine Learning. Your list should look like this:
Course list
Course Name
(Title)Course ID
(Single line text)Class Time
(Date and Time)Semester Length
(Choice)Intermediate Computer Science
CS200
9/9/2021 12:00 AM
Full
Intro to Computer Science
CS101
9/8/2021 9:00 AM
Half
Machine Learning
CS405
9/10/2021 1:30 PM
Full
-
Make the target list. Let's add an Author column (single line text) and a Cost column (currency).
-
To add a Lookup column to the targetlist, selectAdd Column>Lookup.
-
Enter a name to display at the top of the column. Let's call it Course Name.
(Video) How to Use a Lookup Field Column in SharePoint Lists | Microsoft SharePoint | 2022 Tutorial -
UnderSelect list as a source, select the source list. For this example, select the Course list.
-
UnderSelect a column from the list above, select the column from the source list you want to display on this list (the target list) in the new column you are creating. For this example, select Titlesince we want to display the Course Name.
-
To display more lookup information from the source list on the target list, select More options. For this example, select only Course ID.
-
Select Saveand fill out the target list. When you add a book to the targetlist (Reading list),there is now an option to add information from the source list. For the example, for The Future of Computingby Lovelace, select the Course Name "Machine Learning" and the Course ID will be automatically filled in (in this case, it's CS405). Since the columns are lookup columns, you only need to fill out one and the other will fill with the information from the source list.
Your target list should look something like this:
Reading list
Title
Author
(Single line text)Cost
(Currency)Course Name
(Lookup)Course ID
(Lookup)Computer Science for Humans
Smith
$20.21
Intro to Computer Science
CS101
The Future of Computing
Lovelace
$18.15
Machine Learning
CS405
How to Use a Computer Like a Pro
Cline
$44.99
Intermediate Computer Science
CS200
Typing for Tomorrow
Lorenz
$60.20
Machine Learning
CS405
Now the Reading list displays the Course Name and Course ID information directly from the Course list, and it's easier to categorize new list items by selecting options from the Course list. You can also update the Course list and it will automatically update on the Reading list, as well as link directly to the Course list from the Reading list.
Unique columns
When you create a column, you can specify that the column must contain unique values. This means that the list can't have any duplicate values in that column. You can't add a list item that contains a duplicate value, modify an existing list item that would result in creating a duplicate value, or restore an item from the Recycle Bin if it would result in a duplicate value. And if you create a lookup column in a source list, and you define that column to be unique, the column in the target list also must not contain duplicate values.
Note:Uniqueness is not case-sensitive. For example, ORD-231 and ord-231 are considered duplicate values.
A unique column must also have an index. When you create a unique column, you may be prompted to create the index. The index will be automatically created when you select OK. Once a unique column has an index, you cannot remove the index from that columnunless you first redefine the column to allow duplicate values.
Supported column types for unique columns:
-
Single line of text
-
Choice (single value)
-
Number
-
Currency
(Video) Create Lookup Columns in Microsoft SharePoint -
Date and Time
-
Lookup (single value)
-
Person (single value)
Unsupported column types for unique columns:
-
Multiple lines of text
-
Choice (multi-valued)
-
Calculated
-
Hyperlink or Picture
-
Custom columns
-
Lookup (multi-valued)
-
Person (multi-valued)
-
Yes/No
Adding a Lookup column to an existing list
Keep in mind that thesource listis the list with information that you want to display, and thetarget list is the list where you want the information to be displayed. Check out the example above in Getting started with list relationships for an example.
-
In the list where you want the Lookup column, selectAdd column>Lookup.
-
UnderSelect list as a source, select the source list to get information from.
-
UnderSelect a column from the list above, select what information you want to display from the source list in this new column in the target list. The information you select will display in the new column you are creating.
(Video) How to connect SharePoint lists and libraries via a Lookup Column -
To display more lookup informationfrom the source list in more columns, select More options. All the checkboxes you select here will create new columns on your target list. You can add more columns in these settings later if there's more information from the source list you want to display.
-
If you want deletions from the source list to impact this list, below Deletions from source list affect this list,toggleYes. Check outDeleting items with a relationshipfor more information.
-
Toggle any other settings you would like, then selectSave.
Creating columns in the source list
The following table summarizes the column types that can and can't be used to create lookup columns.
Supported column types:
-
Single line of text
-
Number
-
Date and Time
-
Lookup (single value)
Unsupported column types:
-
Multiple lines of text
-
Choice
-
Calculated
-
Hyperlink or Picture
-
Custom Columns
-
Lookup (multi-valued)
(Video) PowerApps Dataverse Lookup columns and Relationships - Create, Edit, View -
Person
-
Yes/No
-
Currency
Deleting items with a relationship
When creating a lookup column, underMore options you can toggle whether deletions from the source list affect the target list. If you do, there are two further settings you select from.
Note:You must have Manage Lists permission on a list to create or modify delete relationships.
Source items cannot be deletedmeans that the because the source list is linking with this target list, no items from the source list that appear on the target list can be deleted. You can continue to add to the source list as normal, but you will not be able to delete items like you could previously.
Deleting source items deletes values in this listensures all related items are deleted from both lists at the same time. If you delete from the source list, the item is also removed from the target list.
If you select neither, and instead toggle No, then deletions from the source list do not impact the target list in any way. There are no additional delete restrictions or delete operations.
Managing list relationships when lists have many items
When a list has thousands of items, it may take longer to sort, search, and filter. Lists will automatically index columns in order of creation date to optimize sorting in large lists. To manually index a column, check outAdd an index to a list or library column.
When you create list relationships in a large list, you can reach a resource threshold or limit and may be blocked under the following circumstances:
-
If you make a column unique in an existing list that has more items than the List View Threshold (but note that adding one item to a list that makes the list greater than the List View Threshold is an operation that is not usually blocked).
-
If you turn on Cascade Delete or Restrict Delete for a lookup field in a list that has more items than the List View Threshold.
-
You have exceeded the List View Lookup Threshold, which by default is twelve lookup columns.
-
The number of items in a delete operation exceeds 1,000.
For more info aboutmanaging lists with many items, check outManage lists and libraries with many items.
FAQs
How to connect SharePoint lists and libraries via a lookup column? ›
In the list where you want the Lookup column, select Add column > Lookup. Under Select list as a source, select the source list to get information from. Under Select a column from the list above, select what information you want to display from the source list in this new column in the target list.
What is a lookup column in SharePoint list? ›A Lookup column is one of the available column types in SharePoint. It looks like a Choice column, displaying multiple options usually in a drop-down for the user to chose from, but unlike a Choice column, in a SharePoint list Lookup column these displayed choices are retrieved from another list.
Can you use Vlookup in SharePoint list? ›First, Vlookup column is not supported in the SharePoint. You can only display column X in the list B through lookup column. You cannot calculate differences between two columns. Create a lookup column in the list B.
What is the limitation of lookup columns in SharePoint online? ›In the Modern SharePoint online list, a view can contain the maximum number of 12 lookup columns. Yes, the default value is also used for SharePoint Online, where the default value is increased from 8 to 12. We cannot use more than 12 lookup columns in a SharePoint online list view.
Can you group by a lookup column in SharePoint? ›It's not possible to Group a Lookup column with Multiple value.
How do I link columns in a SharePoint list? ›- Edit Multiple lines of text column. Edit item > select Multiple lines of text column then click "Edit"
- Add Hyperlink. Click ellipsis > click "Add or edit hyperlink"
- Insert link. Type your URL link and type display text.
- If the answer is helpful, please click "Accept Answer" and kindly upvote it.
- In Excel, on the Data tab, choose Existing Connections.
- Choose Browse for More to open the Select a Data Source dialog.
- Specify the location of the data source that you want to use, select the data source, and then choose Open.
- On the Import Data page, choose how you want to view the data, and then choose OK.
- Find the internal name of another field via list settings>click on the specified column under Columns option, check the url of the column to get the internal name:
- Format the "Completion date" column as shown below:
A lookup column is a referential integrity between the lists in SharePoint. It retrieves one or more values from a target list if those values match the value in the lookup column in the source list. You can easily create multiple relationships between lists without using any calculated fields.
What is the difference between list column and site column in SharePoint? ›The only difference is that with site column it will be done automatically whereas with list column you will have to go through extra steps which involves among others, creating a new custom MP.
What is the purpose of a lookup table? ›
Lookup tables provide a way to add extra information in an event. A lookup table consists of a list of keys and values. You define a lookup table using the table function, and access the table using the lookup function. You can create a lookup table in the rules file or in a separate file.
Can you do VLOOKUP for a list? ›Look up values vertically in a list by using an approximate match. To do this, use the VLOOKUP function. Important: Make sure the values in the first row have been sorted in an ascending order. In the above example, VLOOKUP looks for the first name of the student who has 6 tardies in the A2:B7 range.
How do I link a VLOOKUP to a data validation list? ›Open the Excel document where you want to create the dropdown list using the vlookup function. Now select the cell where your list will start, go to the data tab, and then click on data validation. 2. Now, in the displayed box of data validation, you will have to position the mouse cursor on configuration.
How do I VLOOKUP from one list to another? ›- For lookup_value (1st argument), use the topmost cell from List 1.
- For table_array (2nd argument), supply the entire List 2.
- For col_index_num (3rd argument), use 1 as there is just one column in the array.
- For range_lookup (4th argument), set FALSE - exact match.
Creating a lookup field not only improves the meaning of data but helps avoid data entry errors by limiting the values that can be entered. A lookup field can display a user friendly value that is bound to another value in the source data table.
How many lookup columns can a SharePoint list have? ›According to Nate Chamberlain, you can only have a max of 12 lookup columns in a view. You cannot create lookups across sites (linked lists and libraries need to reside in the same site)
What is the maximum number of lookup relationships that can be added a? ›You can have a maximum of 40 lookups on an object. You can have a maximum of two master details on an object.
How do I group data based on columns in Excel? ›Select the data (including any summary rows or columns). On the Data tab, in the Outline group, click Group > Group Rows or Group Columns. Optionally, if you want to outline an inner, nested group — select the rows or columns within the outlined data range, and repeat step 3.
Can group by be used with multiple columns? ›Usage of Group By Multiple Columns
We can use the group by multiple-column technique to group multiple records into a single record. All the records with the same values for the respective columns mentioned in the grouping criteria can be grouped as a single column using the group by multiple-column technique.
Access opens the Get External Data – SharePoint Site dialog box. In the wizard, specify the address of the source site. The wizard displays the lists that are available for linking. Select the lists that you want to link to, and then click OK.
How do you link columns together? ›
- Select the cell where you want to put the combined data.
- Type = and select the first cell you want to combine.
- Type & and use quotation marks with a space enclosed.
- Select the next cell you want to combine and press enter. An example formula might be =A2&" "&B2.
- Open your List view page in SharePoint Designer using “Edit File in Advanced Mode”
- Search for <ViewFields> Tag. Pick the appropriate field to have link to item functionality.
- Add: LinkToItem=”TRUE” to it.
Search for <ViewFields> Tag. Pick the appropriate field to have link to item functionality. Add: LinkToItem=”TRUE” to it. If you want to have Edit Menu, then add: ListItemMenu=”TRUE” or you can add both.
How do I Create a data driven list in SharePoint? ›- Select Settings. ...
- Select + New, and then select List.
- Enter a Name for the list, and optionally, a Description. ...
- Select Create.
- When your list opens, to add room for more types of information to the list, select + or + Add column.
...
Click on Media and Content > Add Script editor web part.
- Click on Edit Snippet.
- Download the JS code snippet on GitHub at Auto Populate Field Values on Text Change in SharePoint.
- Paste the downloaded code to Script Editor.
Go to the SharePoint Site that you'd like to create a new list for using the Excel Spreadsheet. Click New and choose List. From the Create a list page, choose From Excel. Click Upload file and select the file from your desktop or default site document library.
How do I add a conditional column to a SharePoint list? ›On the New item page, click on the “Edit Form” button and then “Edit Columns” as in the below screen. Now, on the “Edit Columns” form, click on the three dots (:) and choose “Edit Conditional formula” from the menu.
How do I sync my SharePoint libraries? ›- In your browser, on your SharePoint site, navigate to the library of files you want to sync with.
- Select Sync in the toolbar. Note: If your browser asks for permission to use OneDrive, confirm that it's OK.
- Sign in to OneDrive to start syncing your files and finish OneDrive setup.
- Go to the desired document library.
- Click on the + New icon and choose Link.
- Create link to pane will appear on the right side of the page.
- Enter link to the desired document, item, or site into the provided field.
- Sign in to your organization's SharePoint in Microsoft 365 site with your work or school account.
- Open the library you want to sync.
- Select the Sync button. Notes: ...
- At the prompt, click Sync Now to start the sync app wizard. ...
- Select Sync Now in the wizard to start syncing.
How do I link Excel to SharePoint library? ›
- In Excel, on the Data tab, choose Existing Connections.
- Choose Browse for More to open the Select a Data Source dialog.
- Specify the location of the data source that you want to use, select the data source, and then choose Open.
- On the Import Data page, choose how you want to view the data, and then choose OK.
Work with files in Files On-Demand
You can now copy or move files from your computer to SharePoint in Microsoft 365 right from your file system. Save space on your device by making files online-only. These files are only available when you're connected to the Internet, but don't take up space on your computer.
For people outside your organization to sync shared libraries and folders: External sharing must be enabled for your organization. External sharing must be enabled for the site or OneDrive. The content must be shared with people outside the organization at the site or folder level.
What is the difference between a document library and a list in SharePoint? ›SharePoint lists do NOT support check-in and check-out features. On the other hand, SharePoint Libraries support the check-in and check-out feature. When we select any document in the library, we'll see options for check-in and check-out. It is considered one of the most important document management features.
What is the difference between SharePoint list and SharePoint library? ›The simplest definition is that a list is a list of data. A list can have attachments to each item added to the list. A library, on the other hand, is a list of documents with check in and check out capabilities. A list does not have check in and check out capabilities for documents.
Where are synced SharePoint files stored? ›When you sync your OneDrive library, your files are placed in a folder named “OneDrive @CompanyName” if the library is hosted on SharePoint in Microsoft 365, and “OneDrive” if the library is hosted on a corporate SharePoint server.
How do I map a SharePoint site to a network drive? ›- Get the address details of the SharePoint site or library you wish to map.
- Add the SharePoint document library to Trusted Sites in Internet Explorer.
- Map a drive to your SharePoint document library.
When you open a library in File Explorer, the folder on your desktop is temporary. If you use sync, you'll get a persistent folder that stays in sync with the document library.