Follow me on Twitter @AntonioMaio2

Monday, January 27, 2014

Putting Metadata to Work: Working with SharePoint Metadata Features

SharePoint has always had fantastic built-in support for metadata, but many organizations have not yet harnessed the power of metadata to build new efficiency, productivity and security into their business.  This post is the second in a series that will take us on a tour of what metadata is, how organizations can take advantage of its benefits and the SharePoint 2013 features that support it.

Working with Metadata in SharePoint
In SharePoint when end users upload a document to a library or add an item to a list, a number of columns will appear beside the document or item – those columns are how SharePoint represents metadata fields.  Several columns are added by default, like date last modified, last modified by and file type.  Administrators or those with sufficient rights can also add custom columns for various purposes.

SharePoint 2013 Library with Standard Built-in Metadata Columns

SharePoint 2013 Library with Custom Metadata Columns

When custom columns are configured for a library, a user will be asked to fill in those metadata fields when they upload a document.  For example, if we have a library with the custom column 'Community' (or Department, or Classification or anything else) the user will be presented with the Edit Properties window asking them to fill in that column:

SharePoint 2013 Edit Properties Window

As mentioned above, metadata fields are sometimes referred to as tags, but they can also be referred to as properties.

Adding Custom Metadata Columns
To add custom metadata columns is relatively easy.  You would typically navigate to the library or list in question, then click the 'Library' or 'List' tab in the ribbon bar and select the 'Create Column' button, which would bring up the following window:

Creating a Custom Column in SharePoint 2013
You would then give the column a name, select the type of column, give the column a description and select some useful settings like:
  • Must the user specify a value for the column when uploading a file
  • Must every item in the list or library have a unique value in this column
  • The maximum number of characters in the column value
  • If a value is selected by default
For a single line of text the maximum characters available is 255 characters.  If you need more characters entered for a metadata field then use a 'Multiple lines of text' column type, which allows for up to 2 GB of character data in a column value (that's 1,073,741,823 characters).  That said, although it is possible, it is not advisable to store such large amounts of text in a metadata field value as it could hamper overall performance.

As well, depending on the type of column selected, some additional options will appear.  For example, if you select a 'Choice' column which essentially is a dropdown list of choices you'll see the following control added to the page so that you can specify exactly which values are available to users for this metadata column:

Metadata Column Settings for Choice Columns in SharePoint 2013

Finally, you may also specify a validation formula for the metadata values entered.  Toward the bottom of this window, is a +Column Validation section that can be revealed.  It provides the following options:

Validation Options for Metadata Columns in SharePoint 2013

This allows you to specify a formula that is used to validate the data entered whenever a new metadata field is populated for an item in the library or list.  This can be particularly useful when entering numerical data, in order to apply some checks to the data entered.  You can even specify the message shown to the user I they should enter a value that doesn't pass validation.  Some great help is provided on the link shown in this section regarding the syntax to be used in specifying a formula.

Alternatively, to add a new or edit an existing column, you can click 'Library Settings' on the SharePoint ribbon.  A list of all existing columns will be displayed.  From here you may select an existing column to edit or add a new column as well, which will take you through similar windows to those shown above.

Library Settings Page with Metadata Columns

Some common metadata functions performed in this page:
  • Simply click the name of a metadata column to edit its settings
  • Add a new column (takes you to the same process as above)
  • Change the order which columns appear
  • Add columns from a list of site columns (read further below to learn about site columns)
Again, accessing and modifying these settings is pretty easy.  Its just a matter of working through the various options available and Microsoft has provided a lot of control over these particular settings.

Permissions to Add or Modify SharePoint Metadata Columns
In order to configure metadata fields on a SharePoint library a user must have the ‘Manage Lists’ permission on that library.  The ‘Manage Lists’ permission depends on also having the following permissions on the library: Manage Personal Views, Open, View Pages and View Items.  These permission are by default given as part of the ‘Design’ and ‘Full Control’ permission levels, so if you have these permission levels on the library you should be able to add, remove or edit columns (or metadata fields) on a library. 

Of course, a ‘site collection administrator’ or members of a ‘site owners’ group are able to perform such configuration by default.

Limits on Metadata Columns
There are certain limits on the number of metadata columns that you can configure for each SharePoint list or library.  These are not in fact limits, but rather thresholds, meaning you can surpass these numbers but depending on your SharePoint architecture and infrastructure you may or may not see adverse effects.  With the built-in SQL Server configuration for SharePoint 2013, the following numbers of columns of each type are permitted within a SharePoint list or library

Column Type Number of Columns Threshold
Single line of text 276
Multiple lines of text 192
Choice 276
Number 72
Currency 72
Date and time 48
Lookup 96
Yes/No 96
Person or Group 96
Hyperlink or picture 138
Calculated 48
Int 96
Managed Metadata 94

Each column once created will take up a certain number of bytes and this will vary based on the column type.  The threshold shown ultimately comes down to the fact that the sum of all columns in a SharePoint list cannot exceed 8,000 bytes. Depending on column usage or which types of columns are created, users can reach the 8,000 byte limitation before other limitations are exceeded.  For a full explanation how these limits are calculated, please visit the Microsoft SharePoint 2013 Software Boundaries and Limits page and read the section on Column Limits.

Auto-Populating SharePoint Metadata: Property Promotion
When adding Microsoft Office documents like Word, Excel and PowerPoint to SharePoint, metadata that is stored within those files can automatically be added to SharePoint metadata columns.  This occurs for the default metadata columns mentioned, but it can also occur for custom metadata columns in SharePoint. 

If a metadata field stored within a Microsoft Office file has a field name which exactly matches a SharePoint metadata column that is already configured on the library to which it is being added, then the value of the metadata field in the document will be automatically populated in the corresponding SharePoint metadata column.  This feature is called Property Promotion.  There are a few caveats to this feature though:

  • It only works with certain Microsoft Office formats, namely Word, Excel and PowerPoint.  This does not work for PDF files or other formats.
  • SharePoint only checks the ‘Document Properties’ fields (docProps section) within these Microsoft Office file formats.  It does not check any of the Open XML Document format fields (customXML section).  If you have 3rd party solutions storing metadata in MS Office files, ensure that the metadata is stored in the correct section of the file.
  • The SharePoint metadata column must have its named configured to exactly match the metadata field within the file, and this must be done when the column is created. You cannot take an existing metadata column and rename it to match the metadata field.  If you make a typo, you must delete the column and recreate it.
  • This feature does not work if Information Rights Management is configured on the library.

Often when working with Microsoft Office files metadata will automatically be added to the file, like the name of the document’s author, language or creation date.  Third party solutions integrated with Microsoft Office can also add metadata to our documents automatically.  This is a great feature for automatically populating metadata within SharePoint for the most common file formats that we work with.

This post has covered how to work with metadata using several of the basic built-in metadata features within SharePoint.  They are not complex, but for those new to SharePoint many of the concepts are new. 
There are several other features within SharePoint that allow you to work with metadata in more advanced ways; features like:
  • Site Columns
  • Managed Metadata Service
  • Metadata Navigation 
These features will be covered future posts.  For now, I hope you enjoy working with metadata within SharePoint using the features described here.


  1. Your feature above, Auto-Populating SharePoint Metadata: Property Promotion -- I simply am not getting this to work. I have followed your instructions exactly, yet the SharePoint metadata field is NOT being populated with a named field (of the exact same name) within an Excel spreadsheet. Quite frustrating.

  2. This comment has been removed by the author.

  3. I have been trying to figure out why one column wouldn't populate. Deleting and recreating solved it. The tip about typos is priceless.