One of the foundational components of SharePoint is the ability to add metadata to documents, pages, and list items. Metadata is additional descriptions that help explain the “thing” we have selected. That thing may be a document, a list of items, a news post or a host of other items that can be stored in SharePoint. We use metadata in our everyday lives. When we online shop, that t-shirt you are ordering has size and color metadata applied to it to help you filter and find the exact thing you want. SharePoint has that, too!
How Columns and Metadata Work
Good news, you have already been using metadata and columns in your SharePoint lists and libraries. There are several default columns that are built into every list and library, a few of them are:
- Title
- File Name
- Created By
- Created Date
Each of those columns gets filled with the values that become our metadata. SharePoint give us the ability to create our own columns and fill them with the metadata that we find useful. Once that metadata is assigned to an item, we can easily locate that item using Search or queries.
Two Types of Columns
There are two types of columns that SharePoint supports: the List Column and the Site Column. These two items are almost exactly alike. The difference is the scope at which they can be used and how they can be accessed with Search.
List Columns
As a point of clarity, list columns and library columns are the same thing, whether they are used in a list or in a document library is irrelevant. The terminology we use is “list column” to cover both use cases.
Creating a list column in modern SharePoint is quite easy these days. In the default view, we can just click on the “Add column” button in the tool bar.
There are many column types to choose from and you can learn more about each of them by referencing the list and library column types and options page provided by Microsoft.
The important takeaway of this is the scope where the column can be used. For example, if I want a State column and I add all 50 states to a Choice field, I cannot reuse this column anywhere else. I realize that I need to recreate the same 50 state column in multiple places. This quickly becomes inefficient at a large scale. Also, if a 51st state is added to the list, I must remember all the places I created that column so they can all be updated evenly across all locations.
Site Columns
Site columns have a few superpowers over a list column in a single library:
- A site column is a reusable column which can be applied to any list or library in the entire site.
- A site column automatically surfaces the values contained within it to the search engine and is indexed after creation.
- A site column can be created in a content type hub and used anywhere in the farm or tenant.
Who can make a site column?
Setting up a site column is restricted to Site Owners and above. A site owner is assigned when you “Share a site” and invite them as a Site owner
Where is a site column created?
Site columns are created and modified in the Site Settings area of a SharePoint site. There are several ways to access Site Settings but the easiest is to go from inside of Site Contents.
Inside the Site Setting, the Site Columns link is located under Web Design Galleries
After clicking into the Site Columns, you will see a list of the already existing site columns. There is a create button to add your own site column with the details you need. You may be able to find a preexisting site column that will suit your needs, so look and see if one already exists in the list.
After you click Create you will see the same column creation interface that we saw when we created a list column.
Now we will add the Site Column to our List or Library. Any changes we make to a site column will automatically be pushed to every location that uses this column in the site.
Adding a Site Column Where It Is Needed
To add a site column to a list or library you must be an owner of that list or library. In a modern library, adding a site column is a little different than just clicking “Add Column.” Instead, we need to access the Library settings pane. This is done by clicking the gear charm in the upper right corner and then selecting Library settings from the menu options.
About halfway down the page, you will see an “Add from existing site columns” link in the Columns section. Click that link to add a site column.
Choose your site column from the list. In my case, I’m choosing “PlanetsAndMoons” as my column. I also want this to be part of the default view, so I will check the box for that. This will allow me to easily see the metadata that gets added to each document.
My library now contains the Site column.
Conclusion
Site columns can save you lots of time when you are recording metadata that will be used across broad lists and libraries. Any changes made to a site column will replicate to all other libraries in the site that are using the site column. Also use site columns if you want the metadata to be exposed to Search.
Up Next
Coming up in the next blog post, we are going to use the Site column to retrieve content dynamically and display it in a Highlighted content web part.
About the Author
James Cragle is a Collaboration Consultant at New Signature in our Southeast United States region. He is an expert and lover of all things SharePoint, and helps our customers develop and manage dynamic and intelligent workplace environments. In his free time, James is an avid hiker and has recently started experimenting with gardening.