Tuesday, January 12, 2016

Site Settings Part-8 ( Site Columns )

Before developing the lists, SharePoint content types and site columns we need to understand what is SharePoint list, content types etc. And why do we have to create them in the SharePoint site.
Lists are data containers in  SharePoint, where you can store the data of different data types. In SharePoint this content will get stored in the database and the content is very important for any organization.
So whenever you start developing any project the important question you need to ask the client is what type of data or different data types  you're maintaining or want to maintain in future. That data may be Sales documents, Finance documents, Project proposals and implementation documents, maintenance documents etc. These are all different kinds of data. In normal scenario document is a just a document, but in SharePoint you can have types of documents. Each type of document has its own metadata. The way you organize the data and persisting it and entire editing experience is a great thing in SharePoint.To manage the content we will create content Types.
I hope you got a little bit of understanding about the importance of SharePoint list and content type in SharePoint.
Site Columns:
Whenever you develop the SharePoint list and Content type, first develop required site columns that will be used while developing SharePoint lists and Content types.

what are site columns?

A site column is a reusable column definition, or template, that you can assign to multiple lists across multiple SharePoint sites. We will see how we achieve this.
How to create a SharePoint site column?

First of all, you will need to find the site settings in your SharePoint site You'll find this option in the right corner of your screen where the little setting icon is. If you click on it, you'll have a drop-down menu where you'll find the site settings. 



Once you get in there, you’ll see A LOT of different choices that we will probably understand someday, but for now, we will concentrate on the only choice that concerns us which is “site column”. If you really have time to kill, you can hover each choice and a little description will appear.

Once you click on the Site columns option, you’ll realize that there’s a list of a lot of existing ones already on your page. When I saw this, my question was: where did this all come from? It actually makes a lot of sense once you know it. Here’s what my page looks like when I click on this option:


As you can see, there are a lot of site columns already there. The reason is that when you create a Team Site in SharePoint like the one I have, SharePoint provides out-of-the-box apps (lists and libraries) that you can use. Of course, all of this doesn’t come from a magical place. The columns that appears in an app are site columns already available in your Team Site. Now, go back to the picture above, you’ll see that there’s a group called Core Contact and Calendar Columns. Obviously, you’ll find there the site columns that will appear if you create a Calendar in your site or a Contact list. I have to admit that I don’t understand all of the groups available and that’s normal since there’s still a lot to learn about the platform that I haven’t seen yet.
WARNING! Don’t ever delete one of the existing site columns. I’m not going to explain in details why you shouldn’t, but I’m sure you understand the impact of deleting a site column that is already used in SharePoint. It’s related to many different things in your site, so if one day it does not exist anymore, it’s going to cause problems when you will create a new app that requires this site column and much more. Honestly, I don’t know why you would delete one of them, but you never know. Actually, you should just never delete things inside your SharePoint that were already there when you created a new site. The fact is that it’s probably there for a reason and you never know when you’ll have to use that reason.
Let’s create a new site column. If you haven’t seen it in the page yet, there’s a little option on top of the list of existing site columns to create a new one.
SharePoint Site column types
The box that appears when you create a column in a list or a site column is quite similar, but there are a few new choices. 
Publishing Sites – Little Briefing
You have new column types that are especially there for Publishing site. A Publishing site lets you create new web pages in your site. For example, you could have a page layout to create articles and each time you add a new article, it creates a new page in your site with the article. Here’s the difference between the regular column types in a list and the columns types in a publishing page:
Publishing page
List
In a publishing page, your columns are the date you see, the content and the image which are all column types for publishing. The content type for publishing lets you display the content on the publishing page like in the example above of an article. The template on which your columns are displayed can vary according to your choices and you can put different column types for display like hyperlinks and summary links. On the other hand, in a list, the columns are always displayed the same way. You can’t display your columns in a template you chose like you would in a publishing page. I hope this gives you a good overview of the difference between column types for publishing and other column types. I haven’t seen all the possibilities associated to a publishing site, but I’m sure you get idea. If not, don’t worry about it, we will get to that subject in more details later in the series.
Once again, it is important to choose the right column type like I said in my other column types article because many types have impacts on other actions you can do in SharePoint.
SharePoint Site column group
Under your site column types, you have a field where you can choose in which group you want it to be. The groups are the segments you see in your site column list I’ve shown you before.
Most of the time you’ll probably choose custom columns which are like the “other” section. However, if you want to insert your new site column in an existing group you only have to click on the drop-down menu and they will all be there. You can also create a new group. For example, if you know you will have to create many site columns for any list or library that are related to invoices, you can create the group “Invoice” and you’ll be able to find them easily when the moment comes to create a new content type or when you need a specific column related to that.
How to use your SharePoint Site Columns in your lists or libraries?
Now, we’ve created our first site column! Then what? How do we insert a site column in an existing or new list/library? When I learned about site columns, we skipped that part and at one moment I realized I didn’t know at all what to do with those columns afterwards! It’s not the same process as for a column that you create directly in a list of course, but it’s not that difficult. A nice SharePoint developer explained it to me very quickly and I didn’t need more explanation.
Here it goes:
When you are in your list or library (we will use a list for this example) and you want to use one of your site columns, you have to go in your list settings. Once again, you can read my article on SharePoint 2013 navigation and UI if you don’t know where to find the list settings.
This is where you see all the settings you can change for your list including “Add from existing site columns” that you’ll find at the bottom of your page.
When you click on this option you’ll be able to choose the site column you want to add in your list.
Here’s where you’ll see the importance of adding your new site column in the right group when you create it. When your SharePoint site gets a lot bigger after some time, you’ll probably have a lot of available site columns. You’ll be happy to use the site column group filter to find the site column you need quickly instead of searching in the list of all the available site columns.
As you can see in the picture, you can add as much site columns as you want to your list. Therefore, if we create a new list of invoices, we might want to add many site columns created in the group “Invoice” that I mentioned before in my example.
Now, you probably understand why it is great to create site columns instead of creating a column directly in your list. You can then select all the columns you need in the new list or library you are creating, click ok and that’s it! You have a functional list or library very quickly.



1 comment: