Using SharePoint Document Sets to Make Metadata Shine

Using SharePoint Document Sets to Make Metadata Shine

by

Let’s face it; one of the key features that makes SharePoint good at what it does (search, content management, etc.) is metadata.

With metadata, you can categorize and identify information that is valuable in your SharePoint sites. No more painfully long document names and impossibly complex folder structures!

With this in mind, one misunderstood and underused feature offered by SharePoint (Standard and Enterprise Editions) which leverages metadata is Document Set metadata.

Easily put, a Document Set is a hybrid between a folder and a list item. It allows you to group documents together as with a folder and, at the same time, associate metadata to it as you would with an item.

To fully understand what will follow, we’ll first take the time to see what makes up Document Set metadata. Then we’ll see how to make use of its key features and make it shine. Finally, we'll show you a few tips and tricks to fill in the gaps and take care of a few caveats.

But first, make sure you learn the SharePoint Basics before you begin.

What’s in Document Set Metadata?

A Document Set is, in fact, a Content Type. That means you can create your own, and add your own columns to it. A Document Set also has features that set it apart from your ordinary Content Type. Let’s take a look at what they are:

Welcome Page

This is a visual representation of a Document Set. By default, the Web Part page contains an Image Web Part, a Document Set Properties Web Part and finally, a Document Set Contents Web Part.

DocumentSet1

Welcome Page Columns

Within the Welcome Page, you can specify which columns of the Document Set you wish to display in the Document Set Properties Web Part.  These columns are known as the Welcome Page Columns.

DocumentSet2

Allowed Content Types

These dictate which Content Types from your site are allowed within your Document Set.  By comparison, this is the same concept as Content Types applied to a list.

DocumentSet3

Shared Columns

Just like Content Types can inherit columns from parent to child, content within the Document Set can inherit columns from its parent.

DocumentSet4

Key Features

As you can see, the Document Set adds loads of new useful features to the plain old folder.  Some of these features are key, and really make Document Set metadata a must for any serious content management within SharePoint.

Welcome Page: Make it Appealing for the End User

The impact of well-presented information to the end user is underestimated. The Welcome Page breaks down the process of understanding what the page contains with a contextual image, a short description, some properties and an overview of the contained documents.

Without code or any smoke and mirrors, a Document Set Welcome Page can have an appealing visual form, and help the user understand its contents.

DocumentSet5

Shared Columns: Mass Metadata Tagging Made Easy

With the use of Shared Columns, tagging your documents with the right metadata has never been easier!  For example, we've shared the Coach and Locations columns in the Document Set metadata above, and added a few documents to it.  The “Schedule.xslx” document now has the following metadata appended to it:

DocumentSet6

One quick crawl of the SharePoint content and the search engine can quickly find documents related to the coach named “Emile Zatopek”:

DocumentSet7

Tips and Tricks with SharePoint Document Sets

Step by Step Explanation of How to Create a Document Set

Here is an article that will show you how to create a Document Set and add columns to it by Benjamin Niaulin.

Update Your Documents if Shared Columns are Added Later in Time

If by any chance you should add a Shared Column to your Document Set once it already has content, you'll notice that the metadata doesn't get pushed immediately to your documents.

Method 1:

Update each item manually by editing it and saving.  The will cause the metadata to be refreshed.

Method 2:

There is a Timer Job called “Document Set fields synchronization job” which does just this.  By default, it’s configured to execute every 15 minutes.

Either of these methods can be scheduled for a more frequent execution, or you can press the “Run Now” button in the Job Definition:

DocumentSet8

Hide Shared Columns in the Edit Form

One annoying caveat of the Document Set is the fact that, even though Shared Columns are read-only, you can see them in a contained document’s “Edit Form”.  For example:

DocumentSet9

The two Shared Columns are editable but, when the item is saved, changes made to the aforementioned columns have no effect.  Not quite the user experience you'd expect…  A quick solution: Hide the columns with JavaScript!  Here are the steps you need to take:

  1. Ensure that you have JQuery loaded in your SharePoint site.
  2. Add a Content Editor Web Part to the Default Edit Form of the Document Set Library.
  3. Add the following piece of HTML to the Web Part:
  4. Stop editing and save the page.

Voilà!  Your undesired fields are now a thing of the past:

DocumentSet10

Use the List View Web Part

When creating a Document Set, it is provisioned with a Document Set Contents Web Part... which strangely resembles the List View Web Part.  That’s because, behind the scenes, it actually is a List View Web Part that is generated and rendered!  That being said, why not replace the static, non-configurable Document Set Contents Web Part with a List View Web Part and reap the benefits of an editable view?

DocumentSet11

As you can see, the Document Set has a few tricks up its sleeve.  With mostly out-of-the-box functionalities, and some easy coding, you can whip up a very interesting and visually appealing way to make your metadata shine through!

Yohan Belval
Yohan Belval @sharegatetools

Throughout the years, Yohan has explored the deepest and darkest corners of SharePoint. His thorough knowledge of the product allows him to bring out “Out of the box” tastiness and let it shine. If need be Yohan knows his way around the API and can whip up custom solutions quicker than you can say “alternate access mappings”. In his spare time he runs marathons for pleasure.