In the previous article, I have explained the basics of Site columns and how to create site columns. Now, in this article, I am going to explain how we can use site columns in our SharePoint lists. In this article, I am going to cover the following topics.
- Assigning Site Columns to List
- Editing of Site Columns from List Settings
- Editing Site Columns from Site Settings
- Deleting site columns
- Basic difference of Site Columns and List Columns.
Assigning Site Columns to List
Let’s assume that we have created Site Column with name “Product Name” of the Single line of text column type. And now, we want to use it in our list. While creating a site column, I have selected Custom group in Group option. So my column will look like this.
Now, I am having a list called Product. Here, I want to use the Site Column. Currently, I am not putting any column into the list.
Click on the Settings gear icon and then click on Lists Setting link.
This will open up List Settings page. Now, scroll down to Columns section and then click on “Add from existing site columns” link available.
This will open up the “Add Columns from Site Columns” wizard.
Here, you have to select the column that we have created with name “Product Name”. As I have mentioned I have created that column in the custom column group, then it will be very easy to locate that column. Just select Custom columns group in the “Select site columns from” drop down. And now, you will have only columns visible which belong to Custom columns groups. And from here, we can find our “Product Name” column very easily. That’s why using an appropriate group while creating site columns helps us in identifying and locating our columns fast.
Now, just double click on “Product Name” column or select “Product Name” column and click on Add. Once you are done with this step, the column will be now moved from “Available site columns” to “Columns to add” list box.
Now just click on OK button from the bottom and your Product Name column will be added into the Product List now.
Reusing site column in the subsite
Now, just create another subsite and create a list there and follow the steps which I have shown in Creating Site Columns section, and you will be able to add the site columns from parent site to your subsite.
Editing Site Columns from list settings
Now consider a scenario where you have to modify the property of the site column “Product Name”. And now, you want to convert this column as Multiple lines of text. So, follow the below steps in order to edit the site columns.
Open the list settings page as shown in the “Assigning Site Columns to the List” section. Then under Columns section, click on the “Product Name” column. You will see the same window I have already discussed in List Columns article. From here you can easily edit the site column and change the type of the columns or modify any existing column properties.
Here, I have changed the column name from “Product Name” to “Product Name1” and also, the column type from Single lines of text to Multiple lines of text.
Now, let’s observe in the site columns. Here, you will observe that the site column is not changed. It’s still the “Product Name” and the column type is still “Single lines of text”.
So, we can conclude that Site Column is modified into the subsite and does not affect the original site columns. And now, “Product Name1” will act as a list column.
Editing Site Columns from Site Settings
Now let’s edit the site column “Product Name” from the list setting option. Open the site columns page as discussed in the previous article. Now, click on the “Product Name” column. This will open up “Edit site columns” window. Here, you have several properties to configure.
Name and Type
Here, you can select any column type you want to convert. For this example, let’s convert the column type from Single lines of text to Multiple lines of text.
By selecting Multiple lines of text column type, you will have all the options available with Multiple lines of text column type as discussed in Multiple Lines of text article.
You can update the group of site columns from here again.
This is a very important option available with site columns and this is the main power of site columns. Here, you have an option like “Update all list columns based on this site column?” option. Here, you have two options. Yes or No. By default, Yes will be selected.
If the value “Yes” is selected, then in that, it will change column types in Site Column and update its reference everywhere this column is used. For example, if you have added this site column to List A and List B, then in that case, now List A and List B will have “Product Name” columns as “Multiple lines of text” and the values will be sustained.
If “No” is selected, then in that case, it will not update every instance of this site column and now, every list that has added this site column will lose all the references and get converted into List columns and now Product Name would act as Multiple lines of text for a new list in which this columns are added now.
Let’s select “Yes” and click on OK. Once you click on OK you will have the following alert box.
So, now, every list that has added this site column will get converted into Multiple Lines of text column type. Click on OK and then, open up the list setting page of the Product list.
Here, you can see that the column “Product Name1” which was updated from the list column. Again, it reverted and the final setting that we have applied in Site Column setting at the site level is applied here. And the column name is changed to “Product Name” again.
Deleting Site Columns
Edit the site column using the steps discussed above. And click on Delete button at the bottom of the page. When you click on the Delete button, SharePoint will ask you following confirmation.
It means, if we delete the site columns, then, in that case, all the reference of this column into the list will get converted to List columns by default.
Basic difference of List Columns and Site Columns
In order to understand the basic difference between List columns and Site columns please refer to the following table.
|List Columns||Site Columns|
|Scope of the list column is upto the list in which it is created||Scope of the site columns is from sites to subsites (Top to bottom) approach|
|List columns cannot be reused||Site Columns can be reused into multiple lists and subsites|
|List columns does not get crawled automatically||Site Columns get crawled automatically|
|The managed metadata column is not created automatically by Search Services||The managed metadata column property is automatically created by Search Service application|
Now, what are the Search Services that we will be discussing into upcoming articles of this series? If I find out about more comparisons or differences I will immediately update this article and include new comparisons and differences.
In this article, we have seen how to add site columns to the SharePoint lists, edit site columns, and how assigning and editing site columns affects the lists if that list has used the site columns. We have also discussed various basic comparisons between List Columns and Site Columns.
Any question or feedback or suggestion, please do comment and let me know.