Introduction to SharePoint Columns
In previous article, we have seen that what are list columns in SharePoint. In this article we will be exploring one of the list column 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, to address. The attributes or metadata are called columns in SharePoint terminology.
Available column types
There are various types of columns available in SharePoint, which are based on the value it can hold. The list of column types are given below.
In this article, you will learn about single line of text column type.
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.
Creating Single Line of Text column
Type a name for this column. Here, you have to specify the name of the column such as FirstName, Email etc.
Additional Column settings for Single Line of text column are shown below.
It stores the description regarding the column purpose. For example, if you have created the column for email, then the description can be like “stores the email address”.
Require that this column contains information
If this is checked to “Yes”, then list/library form will not save until this field is blank. It will fire the required field validation. If this is checked to “No”, then there will no required field validation. Default value is ‘No”.
Enforce unique values
If this is checked to “Yes”, then no multiple rows can contain the same value for this column. This can be used to store the email address or the username where we require that every record has a unique username or an Email address. Default is “No”
Maximum number of characters
Specifies the maximum number of characters which can be stored in this field. Its maximum value is 255. By default, the maximum value is set. If you try to alter the value and new value is more than 255, then it will give an error. You can have more than 1 or less than 255 as a value in this field.
Here, default selected is “Text.” The value entered in the given text box will be saved as a default if you don’t enter any value in this column, while saving the list/library form. You can also select the value as “Calculated.” Once you select the value as “Calculated”, you have to specify the formula. And this field will not appear in add/edit list/library forms.
Add to default view
If this option is checked, then this column will be displayed in the default list view, else it will not be displayed in the default view, if this value is unchecked. Default is “Checked”
Editing Single Line of Text column
While editing Single Line of Text column, you will have the configuration given below of which the setting is available.
Type a name for this column
When you create a new column, an internal name associated with the name is also created. While editing the column, if you change the name of the column, then the title of the column will be changed to the new updated value but the internal name for this column won’t be changed. The internal name is only used, when you are dealing with the columns programmatically. Thus, if you need to rename the column and you want that internal names should also be changed, then there is only one way to achieve this, using GUI; i.e., deleting the column and recreating it with the required name.
The type of information in this column is here, there are several column types available such as “Multiple lines of text”, “Choice” etc. The reason behind displaying this column types is that you can convert this Single line of text column to the given column type without losing the existing data. This is not the case with every column type. For example, you cannot convert multiple lines of text column to any other type of column, so when you edit the multiple lines of text column, then there will be no column type, which will be displayed.
If you are converting Single line of text column, type to Date time, Currency or Number, then the existing data must be in numeric forms.
All other configuration description remains the same, as we discussed in “Creating a Single line of text” section.
Bonus points for editing Single line of text column
Consider you have selected the value ‘Calculated” in the “Default Value;” you have not entered the calculation formula and saved the column. Now, when you edit the column, you will find that the “Default Value” is selected as “Text”. Thus, if you don’t write any calculation formula that will be considered as “Text”.
I hope, you enjoyed the article. My next article will be on Multiple lines of text column type.
Any question or feedback or suggestion, please do comment and let me know.