Sharepoint 2013 : Choose a Column Type (part 1) – Single Line of Text, Multiple Lines of Text

Scenario/Problem: You are creating a new column in a library, list, or site, and you have to select a column type for the new column.

Solution: When you’re creating a new column, the first thing you need to decide in addition to the name for the column is its type. The type of the column defines what kind of data can go into it, and SharePoint has a lot of different built-in column types for you to choose from. The following sections explain each built-in column type and the different settings you can define for each one.

Single Line of Text

You use the Single Line of Text column type when you want the user to enter simple text, in a single line (that is, no line breaks), as shown in Figure 1.

FIGURE 1 The First Name and Last Name columns in a contacts list are examples of a Single Line of Text column.

Aside from the regular settings, such as the description for the column and whether the column is mandatory, you can also define the maximum number of characters allowed in the field (up to 255 characters) and the default value for the column (see Figure 2).

FIGURE 2 Defining the settings for a Single Line of Text column type.

The default value for a Single Line of Text column can be either a static piece of text that you type if you select the Text option or a calculated value showing the current user’s account name by using the token [Me]. For example, you might want to create a calculated default that will have text (that the user can change) saying who purchased an item. The default is the name of the current user filling the form, but if the user is filling in the form for someone else, the text might need to be changed. Figure 3 shows how to configure this, and Figure 4 shows how it looks to users.

FIGURE 3 Defining a calculated default value.

FIGURE 4 The calculated default value when a user creates a new item.

Multiple Lines of Text

The Multiple Lines of Text column type allows users to enter text with more than one line (that is, line breaks are allowed). It can be configured to allow different editing options for the user, as shown in Figure 5.

FIGURE 5 Different configurations of the Multiple Lines of Text column.

As shown in Figure 5, the column type can be configured to allow rich formatting of the text: You can make parts of the text bold, underlined, or a different font or color, and you can even include pictures, tables, and links.

The enhanced rich text option shows as an empty text box, but when the user switches to that text box, the Editing Tools ribbon appears, enabling the user to edit the text using the enhanced text-editing options available through that ribbon, as shown in Figure 6.

FIGURE 6 The Editing Tools ribbon displays to the user when the cursor is in an enhanced rich textbox control.

Figure 7 shows the settings for this column type. This column type does not support a default value, so no setting exists to configure one. However, you can configure the column with three settings that are special for this column type, as explained in the following sections.