In the previous article, I have explained about RSS Settings in list settings using which we can display RSS feed for any SharePoint list. In this article, I am going to explain about columns in SharePoint.
In this article, I am going to explain,
- Introduction to List Columns
- Data types available in columns
- Creating list Columns in SharePoint
- Editing list Columns in SharePoint
- Deleting list Columns in SharePoint
- The scope of List Columns in SharePoint
In part five of this series, we have seen that SharePoint maintains data in the lists and libraries. All the data is stored in columns (properties). And every property has its data type. For example if we are storing the salary of an employee then it must be in numbers, salary should not be stored like forty thousand and five hundred, instead, what we do, we store it like 40500. Similarly, each piece of data has its own data type. In SQL or any other database server we have many columns types such as Text, Number, Blob, Boolean etc, and in SharePoint also we have some predefined data types. Let’s explore SharePoint columns in detail.
Introduction to List Columns in SharePoint
Microsoft defines SharePoint columns as “A column represents an attribute, or piece of metadata, that the user wants to manage for the items in the list or content type to which they added the column”. If we are creating a SharePoint list, then without columns we cannot store any kind of data in SharePoint list. A list without columns is like a table without columns in SQL server. Based on the data stored, SharePoint columns have several types.
A column in SharePoint can be used to represent additional information about the list or the library items. Columns are called the attribute or the metadata for the list/library items. For example, consider you want to maintain information about an employee who is working in your organization, then you will create a SharePoint list and you will add an attribute such as name, telephone number, or address. The attributes or metadata are called columns in SharePoint terminology.
Data types available in columns
As we have discussed earlier in this article, there are many data types available in SharePoint to store the data. Let’s see each of them in detail.
- Single Line of text
- This column can be used to store the plain or unformatted text values such as name, email address, etc. It will store the value as text form. The size limit for this column is 255 characters. The user cannot store beyond 255 characters of information into this column type. This column type can be used to store username, email, name etc
Multiple lines of text
- This column type will store the large data including p text, formatted text such as HTML, images etc. If we are creating this column in List then the limit of this column is 63,999 characters, while if we are creating this column in SharePoint document library then we can store content up to 2GB. This column can be used to store the descriptions, notes, comments etc.
- This column type will store selective data type. Selective means the user can select single or multiple values from this column type. This column type will act as Radio Button, Drop-down, and check-boxes. Here you have to specify the predefined values. This column type can be used to store gender, hobby, city etc.
- This column type will store only numeric data. This column will not allow saving textual data. If you try to save text data into this column, SharePoint will throw an error. This column can be used to store integer values and decimals also. These columns can be used to store salary, age etc
- As the name suggests, this column will store the currency. This column can be used to store the information like salary in currency, product price in several currencies etc.
- Date and Time
- This column type will contain the value related to Date and Time. This column can store only date, date and time together. This column will also not allow any value other than proper date time string.
- Lookup (Information already on this site)
- We have reference key or foreign key in SQL server, same as in SharePoint we have lookup columns. Using this column, we can reference values from another list.
- This column will save the Boolean values in Yes and No. In SQL Server we have True and False, in SharePoint we have Yes and No. This column can store the values in Yes and No only. Other values are not allowed.
- Person or Group
- SharePoint has users and groups. A person or group column will save the values of Users or Groups.
- Hyperlink or Picture
- This column will store a link or image. If we have to store the image, then we have to first upload the image to somewhere in SharePoint and then give a link in this column. You can insert a link from SharePoint and out of SharePoint also.
- Calculated (calculation based on other columns)
- Sometimes we want to combine 2 columns to merge into one column. Such as if you take an input as First Name and Last Name in two different columns but you want to merge it as Full Name in another column. Then, in that case, you can make use of this calculated column. This column can take values from the list in which this column is created.
- Task Outcome
- This column type is used in Workflows.
- External Data
- This column is used to display the information from outside of SharePoint such as from any other external data source.
- Managed Metadata
- This is a special column type. This column type fetches information from SharePoint term store and allows the user to select values from term stores. These columns provide autocomplete text box.
Creating list columns in SharePoint
We have seen what columns in SharePoint are and what are available types for columns. Now let’s see how we can create a SharePoint list column. There are multiple ways of creating columns in lists. Let’s see each one of them.
From SharePoint List Ribbon in Classic layout
Open the list in which you want to create a column. I have already created a list with name RSS. Then click on the List ribbon. There you will have a menu item as “Create Column”. Clicking on this menu item will open up new column creation page.
From Quick Edit view
Open the list in which you want to create a column, click on Edit link.
Clicking on Edit link, the list will be now open in datasheet view. And you will find a Plus (+) sign. Clicking on + sign will open up the create column page.
From list settings page
Open the list in which you want to create a column. Click on List tab in the ribbon and then click on List Settings menu under the list tab.
This will open up the list setting page. Scroll down to the columns section. There you will find a link with text Create Column. Clicking on this link will open up the create column page.
Add columns from the list view itself (Modern Layout)
When you will open up the list in Modern Layout, you will find the link for Add Column in the listview itself. Clicking on this link will open up the create column page.
Add columns from Column Setting on list view in Modern Layout
Open the list in the modern layout in which you want to add the list columns. Click on down arrow on any column. Then click on Column Settings option and then you will have a link of Add Columns. Clicking on that will provide you the types of columns that you can create in the current list.
Editing list columns in SharePoint
As we have seen there are many ways available to edit the list columns, but now consider you have created new list columns and now you want to edit the columns details. Then you have to follow the below steps to edit the list columns.
Editing from list settings
Let’s assume that we have to rename the Title column to Employee name. In order to perform column editing, open the list setting page by using the steps we discussed earlier in this article. Now you will see your column in the column list. Click on the Title column.
This will open up the column editing page. Change the name of Title to Employee Name and click on OK.
Once you have clicked OK button, you can now see that the Title column is renamed to Employee Name. Every value will be retained even though you are renaming the column name.
Editing from list view in Modern Layout
If you just want to rename the column back to Title from Employee Name, and if you are working with the modern layout of the list, then open the list. Click on the down arrow of the column you want to edit and click on Column Settings and then click on Rename.
This will open up the column rename dialog. Change it to Title from Employee Name. And your column name will be renamed to Title.
Deleting list columns in SharePoint
In order to delete the list columns in SharePoint, please open the list settings, and scroll down to column section. Click on the column which you want to delete.
Clicking on the column, this will open up the edit column, scroll to the down to the page. There will be a Delete button available. Clicking on Delete button will delete the columns from the list.
The scope of List columns in SharePoint
The scope of a List column is up to the list in which the column is created. It means if we have created a column in a List A, then we can access that column in List A only. We cannot use that column in List B or some other List C. Thus the scope of the list columns are very limited and due to this, the column cannot be reused.
In this article, we have explored the list columns available in SharePoint. We have seen the data types available in SharePoint columns, along with that we have seen that how to create a list column in multiple ways, how to edit the columns in multiple ways and also how to delete the columns from the list. We have also discussed the scope of the list columns in brief.
In the next articles in this series we will be exploring each and every column data types in depth and know how they work in SharePoint.
Any question or feedback or suggestion, please do comment and let me know.