Wednesday 2 March 2016

Difference between SharePoint Column, SharePoint Site Column and Content Type.

Columns in SharePoint

As you may have experienced by now, SharePoint is a platform that allows a user to quickly and easily create a Site. This may be to help a team collaborate, or an external site - there are many scenarios. But how do you do this? With Lists and Libraries, which are kind of "Excel" spreadsheets on the web, if you will. We create a table and, as we add columns to this table (list/library), we are asking whomever is entering information in it to specify certain details we call "Metadata".
SharePoint Columns, Site Columns and Content Types explained
However, the columns we have in a list or library can be created or added in multiple ways. Each of these ways has its pros and cons.

List and Library columns

This is probably the most popular type of column created. They're easy to create and you don't have to overthink it.
SharePoint Columns, Site Columns and Content Types explained
They're accessible directly from the ribbon, and are available on all lists and libraries.
SharePoint Columns, Site Columns and Content Types explained
The person creating the list or library column can then choose from a list of column types to help control the information coming into the list. For example, if you're making an Invoices document library, you'll want to make sure that the customer associated comes from a verified list of customers without any spelling mistakes.
Advantage: Well, they're easy to create. Within seconds the Power User can find himself in the "create column" menu, adding ways to control content coming in his list or library. These don't require any questioning on reusability or architecture, it's an instant consumption.
Disadvantages: They're easy to create. Yes, one of the issues I have found with SharePoint is that, sometimes, it's greatest advantage can also be a disadvantage. The option is right there in front of you, in the ribbon, and will satisfy the immediate need for a column. However, it doesn't promote reusability or help leverage what already exists in a parent site. It exists in that list or library once it's created, and that's it.
A customer once had close to 100 document libraries in a site. They all had one column that was exactly the same. They always used "Create Column" to create a library column. This only made it available in each of these libraries. What happened? Well, after a couple of months, they realized that a few libraries had the column misconfigured. This was simply due to human error, after repeating the same action so many times. Others realized that it was just too long to update the column with new configuration, because they had to go to each library in the site, one by one, to edit them.

Site columns

SharePoint also offers the possibility of creating Site Columns. What are these? They're columns we create in a SharePoint site, and are available to its subsites.
SharePoint Columns, Site Columns and Content Types explained
As you can see, when you create a SharePoint Site Column, it is available to the site and its sub-sites. This makes it very easy for us to reuse a configuration.

Do more with Foundation

SharePoint gives you a site, and allows you to collaborate within it. However, if you try to interact with another site, it can be very difficult. Unless you have the Standard or Enterprise version of SharePoint, with the Content Query Web Part, it will be difficult for you to interact with other sites.
In some cases, it can be useful to create a Lookup Site Column, so that the actual lookup will also be available in sub sites. Take the diagram above for instance: if Site Column A was a lookup column to a list of customers available only in the Top Site, then all sub sites would have the Site Column A with the lookup to the customers list in the top site.

Creating the Site Column

I usually recommend creating the Site Column at the top site so that all sub sites, and future sub sites, can benefit from it. However, this may not always be the best thing to do in all cases. If you have 100 sub sites, and all site columns are created at the top, you will quickly find yourself overwhelmed with columns that are not needed in most sites.
To create a Site Column you will have to go through the Site Settings and find Site Columns under the Galleries section.
SharePoint Columns, Site Columns and Content Types explained
When you create a Site Column, you have various additional choices aside from the usual suspects.
SharePoint Columns, Site Columns and Content Types explained
Most of these columns are available for Publishing Sites. They are columns used in page layouts to facilitate the entry of metadata, while creating a Publishing Page in SharePoint. Simply put, these are columns that are placed in a Page.
Advantages: They can be reused by multiple lists and libraries within a site and its subsites. It also helps by centralizing the configuration of the column in one place, which makes it easier to update choices in a choice column, for example, that are used by multiple lists and libraries.
They also allow all sites from a Site Collection to look up information in a single list, such as a customers or manufacturers list, for example.
Disadvantages: They're not as intuitive to create as list/library columns, and you need administrative rights to create them. If overused, they can create chaos within available sub sites. They also require the administrator to think about columns and architecture every time one is created.

Content Types

You will hear this word repeatedly while working in SharePoint. Everything revolves around Content Types. In fact, you have been using them since you started. Content Types are basically a way of grouping Site Columns together into a reusable group that presents some kind of content to us. For example I could group the Site Columns Invoice #, Customer, and Related Product together into an "Invoice Content Type". This way every time I go to a document library that would need to use these, I would just assign the Invoice Content Type to it.
By default when you create a Content Type, just like Site Columns, it is pushed to all sub sites of the designated site where it was created. A Content Type can only exist within a Site Collection. If you want to reuse it in another, you will have to recreate it, or use tools like Sharegate to transfer them. Microsoft offers an alternative in SharePoint, called the Content Type Hub, which I will not cover in this article. But, basically, it's a way to centralize your Content Types in one place. It also comes with its pros and cons of course.
What did I mean when I said you've been using them since you started with SharePoint? Well, how do you think your "Announcement list" or "Task list" got their columns? Magic? No. The answer is pretty simple, actually. Someone at Microsoft created a few Site Columns that make sense for each of them like "Task Name", "Start Date", and "Due Date", and grouped them together calling it a "Task" Content Type. When you create a Task list, it simply creates an empty list and associates the Task Content Type to it.
Don't believe me? Take any list or library in SharePoint and do the following:
Go into the List or Library settings
SharePoint Columns, Site Columns and Content Types explained
Then click on Advanced Settings in the General Settings menu
SharePoint Columns, Site Columns and Content Types explained
You see, SharePoint hides the use of Content Types from the general and Power User so that it doesn't confuse them by giving them too many options. Finally, we are going to Allow the Management of Content Types.
SharePoint Content Type Management
By clicking on OK, and returning to that list or library's settings, you'll see a new section below the General Settings. You'll also notice all the associated Content Types to the list, and the necessary options for managing them.
SharePoint Columns, Site Columns and Content Types explained

Confusing...

When I first started working with SharePoint and Content Types, it took me a while to realize that when you associate a Content Type to a list or library, it is copied to it. This means that if you edit the Content Type from the List or Library settings menu, it will only affect that List or Library. The original Content Type will stay untouched in the Content Type Gallery of the site it was created in. In most cases, this happens to be the top site. So if I follow the steps above for our Task list with the Task Content Type and "Remove" the Assigned To column from the Task Content Type, it will only affect this specific Task List.

Much more

Content Types can be much more than just a way of grouping Site Columns together, it also offers some basic settings to be attached to that grouping. For example, you can associate a document template to your Content Type. Taking my previous example, I could associate a blank invoice template to my Invoice Content Type, so that each library using that Content Type would also have the template. Many other settings can be configured per Content Types.
SharePoint Columns, Site Columns and Content Types explained
And if your users have ever asked you to remove the "Title" column, well, it's through the Content Type associated to the list or library that you can set the Title column to "Hidden".

They follow a hierarchy

You can't just create a Content Type anywhere, to be used with anything. There are no "wildcard" Content Types in SharePoint. Some of these come with SharePoint, and are at the top of the tree like "Item" and "Document". It's not for no reason that SharePoint asks you create a New "Item" when you are in a list and to Upload "Documents" in a library. These are not just words they have written on a page. Those are the actual names of the Content Types used.
When you create your Content Type, you have to choose which Parent Content Type you want to create it under. This will make it inherit the Site Columns associated with the Parent Content Type as well.
For example, if I create an Invoice Content Type that inherits from the Document Content Type, I will automatically have the column "Title" with my Invoice Content Type. And this is only because "Document" inherits itself from "Item" as a Content Type.
Here are the questions you are asked when creating a Content Type:
SharePoint Columns, Site Columns and Content Types explained
If I create my Content Type under the "Item" Content Type, then it will be available to all SharePoint lists, but no Libraries. And vice versa: if I create it under "Document", then it will not be available for any Lists.
SharePoint Columns, Site Columns and Content Types explained
Above is a quick view of the Hierarchy of some of the Content Types you may recognize in SharePoint 2010.
Advantages: Content Types are necessary to organize reusable content and configurations within SharePoint. Making sure all Invoices have the same metadata and document templates, for example. They also help you centralize all of these configurations in one place - the site where the Content Type is created. Content Types are lot more powerful than I have led you to believe and, with deeper exploration, you will find out how powerful they can really be.
Disadvantages: Not so easy to understand, at first, for beginners in SharePoint. They are also very powerful, and can be misused or help destroy SharePoint solutions very quickly in the wrong hands. They have a huge impact on your SharePoint Architecture, and should not be created without having seriously considered their impact on other SharePoint features or sites.

My Conclusion

Once again, SharePoint has proved that there is no "golden rule" to follow. It always depends on a few factors, and some may be more important to you than others, given the situation.
It may be easier to show Users how to create regular list or library columns to increase User Adoption in the project. End Users might feel like they have more control over their site. They will probably enable end users to be a lot faster when creating their own lists and libraries to manage their content. However, when the time comes to update a configuration, or migrate information in a column, it could be a challenge, and may cost just as much time as they saved at first. Then we have Site Columns which are reusable columns, and offer additional functionality that the regular columns do not offer, like the cross site lookup. Then again, deciding when to create a Site Column requires some thinking, and the same goes for Content Types.

No comments: