by Ishai Sagi

Chapter 7: Creating Lists and Document Libraries

Analysis
May 1, 200963 mins

Sams

  • Open the Create Page for Lists and Libraries

  • Create a New Document Library

  • Create a New List

  • Create a New Survey

  • Add a Column to a List or Document Library

  • Add a Site Column to a List or Document Library

  • Choose a Default Value for a Column

  • Choose a Column Type

  • Change or Remove a Column in a List or Document Library

  • Change the Order of Columns in a List or Document Library

  • Branching in Surveys

  • Add a Site Column to a List or Document Library

  • Rename a List or Document Library or Change Its Description

  • Change the Versioning Settings for a List or Document Library

  • Change the Document Template for the New Button in a Document Library

  • Add a Content Type to a List or Document Library

  • Remove a Content Type from a List or Document Library

  • Enable or Disable Folders in a List or Document Library

Lists and document libraries are used throughout SharePoint to store any information that users need. This chapter explains how to perform basic tasks around creating and customizing lists and document libraries, including creating columns (metadata), setting the document templates for document libraries, and more.

Open the Create Page for Lists and Libraries

Scenario/Problem: You want to create a list or a library.

Solution: There are different ways to get to the list or document/picture/form library creation page, and depending on the configuration of the site, the choices may be different.

The first step is to open the site where you want the document library to be created. In most sites, you can then open the Site Actions menu and choose the Create menu option to get to the Create page (see Figure 7.1).

FIGURE 7.1

Open the Site Actions menu and choose Create.

In sites that are configured to be publishing sites, the Create option is not in the menu—it is replaced by options such as Create Page, which is used to create pages in the site, and Create Site, which is used to create subsites under the current site. In sites where the option is missing from the menu you must use the View All Site Content option either on the Site Actions menu or the link in the left navigation bar (see Figure 7.2).

FIGURE 7.2

Use either option to get to the All Site Content page.

Selecting this option opens the All Site Content page, where you can then click the Create button to get to the Create page.

The page that allows you to create lists and libraries then opens, showing all the different kinds of lists and libraries that you can create in that site (see Figure 7.3). Different sites may show different kinds of list and library templates.

FIGURE 7.3

The list and library Create page.

Create a New Document Library

Scenario/Problem: You want to create a new document library.

Solution: After you open the Create page, as explained earlier in this chapter, click the Document Library link to create a new document library. The following page asks you for the required settings for the document library (see Figure 7.4). This page might show different options for the document library, depending on the server configuration. For example, some SharePoint servers can allow a document library to have an associated email address and receive emails sent to that library directly into the document library itself. If that option is enabled in the server, the settings page will ask you for additional information, such as the email address that should be associated with the document library. If the option is not enabled, the setting will not be displayed on the page, as can be seen in Figure 7.4.

FIGURE 7.4

Settings for a new document library.

The first option is the name for the document library. This name determines not just the title that the users will see, but also the link that will be created for the document library. For example, if you call the document library Presentations, the link to the document library is the link to the site and then /Presentations. This point is important because although you can change the title of the document library later, you cannot change its link. You can also set the description for the library. This description is usually displayed to users in the All Site Content page next to the library’s name, and in most cases it also appears in all the views for the library, just above the view. You can always change the description later in the library’s settings.

For more information about how to change the title or description for a list or a document library, see “Rename a List or Document Library or Change Its Description” later in this chapter.


Tip – If you want to avoid complicated links, choose a short name for the document library when you are creating it, and after that change the title for the document library. For example, if you want to create a document library for human resources policies, name it HRP when creating it, and then change the title to Human Resources Policies after it has been created. That way, the link is short and easy to type or view (when sending it in email, for example), and the title explains to all users what should be in that document library.

This approach can also help you avoid unreadable links. For example, if your document library’s name has spaces in it, the link to the document library will have the special character combination %20 instead of the spaces, which will make the link look long and complex. Using this tip you can create the document library with a short name without spaces, and then rename the title to have the spaces.



Note – Although you can have two document libraries with the same title, you cannot have two document libraries with the same link. This means that the link to the document library must be unique, and in this initial screen, you choose the unique name. If that name is already in use, SharePoint prevents you from creating the document library and asks for another name. Remember that you can always change the title afterward.


The next option you can set is whether a link to the document library should be added to the quick launch navigation bar (the left navigation bar for the site). This option can be changed later also.

The next choice to make is whether SharePoint should manage versions for documents in the document library. If you choose YES then all changes in documents will create new versions of the documents. Although you can change this option later, if you choose NO, all changes made in documents until you change the setting will not be stored in separate versions. However, if your site has a size quota, and you are worried about consuming a lot of space, leaving this setting turned off can save quite a bit of space.

For more information about changing the versioning information for a list or document library, as well as setting some more advanced versioning options, see “Change the Versioning Settings for a List or Document Library” later in this chapter.

The last option, Document Template, enables you to pick the application or type of file that will be used when the user clicks the New button in the document library. For example, you can choose Microsoft Word to have SharePoint open an empty Microsoft Word document when the user clicks the New button, or you can choose any of the other Microsoft Office applications. For web pages, you can choose either Basic Page (an empty page that you can then type text on) or Web Part Page, which will create a page that allows the user to add web parts.

By default, the new document library has only the Document content type associated with it, so the New button does not show any options for different kinds of file types, but here you can set a specific file type that the users can use with the New button. This can be later changed also, as explained in “Change the Document Template for the New Button in a Document Library,” later in this chapter.

When you are finished selecting the options, click Create to create the document library. A new, empty library is created with the settings you chose.

Create a New List

Scenario/Problem: You want to create a new list.

Solution: To create a list in a site, navigate to the site’s list and library’s Create page, and click the link for the type of list that you want to create. For example, you can create a list of events by choosing the Calendar type or a discussion board list by choosing Discussion Board. If you want a list that does not have any specific columns like those lists, choose the Custom List type; that creates a list that has only one column (Title), to which you can later add additional columns as explained in “Add a Column to a List or Document Library,” later in this chapter.

Selecting one of these options opens the page that enables you to select the initial settings for the list. Some lists, such as the survey list, have special settings, which are covered later in this chapter, but most lists have exactly the same initial settings.

Similar to the initial settings for a document library, a list first requires you to choose a name. However, unlike with document libraries, the link to the list (or any other news) is the site link, then /Lists/, and then the name you choose for the list.


Tip – As with document libraries, it is recommended that you choose a short name for the list when you are creating it and after that change the title.



Note – As with document libraries, the name you choose here must be unique in the site. If you choose a name that is already in use in the site, SharePoint does not let you create the list and asks you for a different name. Remember that you can always change the title to anything you want after the list has been created.


You can also set the description for the list that will show up in the All Site Content page of the site next to the list’s name and in the views of the list. This can be modified later in the list settings. For more information about how to modify the title or description of a list, see “Rename a List or Document Library or Change Its Description,” later in this chapter.

Finally, you can choose whether a link to the list should be added to the quick launch (the left navigation bar) of the site. This, too, can be modified later, either through the list settings or through the site navigation settings (read more about changing the site navigation in Chapter 13, “Customizing a SharePoint Site”).

When you are done selecting the options, click Create to create the list. A new, empty instance of the list type that you selected is created with the settings you chose.

Create a New Survey

Scenario/Problem: You want to create a new survey.

Solution: To create a survey, choose Survey in the list and library’s Create page of the site. Selecting this option opens the survey initial settings page for the new survey you are creating.

Although most of the settings are exactly like the ones for a regular list, the survey list has two more settings that you need to set before creating the list. These options appear under the Survey Options section of the page.

The first option to configure—Show User Names in Survey Results?—enables you to decide whether the survey will be anonymous. Choosing No means that the person viewing the results of the survey will not be able to tell who answered what in the survey in any way. This setting is useful if you want to get honest feedback from people who might be concerned about revealing their true opinions—for example, using an employee satisfaction survey.

Choosing Yes tells SharePoint to show the name of the person who answered next to his or her answer in the reports. This setting is useful when you want to track who answered what—for example, a survey that collects data from employees about what hotel they like to stay in when they are traveling.

The next option is whether to allow multiple responses. By default, a survey allows each person to answer the survey only once—like a voting system. However, you might want to create surveys that allow people to respond multiple times—for example, a survey that asks employees for suggestions for improving the company, where every employee might want to answer several times, every time they think of a new suggestion.

After you finished setting the settings for the survey, click the Next button. Unlike with other list types, when creating a survey you will immediately be redirected to create questions for the survey.

The questions are almost identical to list columns, and creating them is almost the same as the process described in “Add a Column to a List or Document Library,” later in this chapter. However, surveys also have additional options for column types that are not available in regular lists: the Rating Scale question type and a Page Separator. The task “Choose a Column Type” describes these options in more detail.

When you are finished configuring the first question of the survey, either click the Next Question button to create another question, or click the Finish button to finalize the survey. Questions can always be added, modified, or removed in the future (see “Change or Remove a Column in a List or a Document Library” later in this chapter).

When creating questions for surveys, the questions support another unique option called branching. This enables you to display different questions to users based on the answers they answered previously. For more information about branching, see “Branching in Surveys,” later in this chapter.

Add a Column to a List or Document Library

Scenario/Problem: You want to create a new column and add it to an existing list or document library. For example, you might want to add a date column called Birthday for a contacts list or a choice or lookup column called Client to a document library so that the users can choose which client the document is about. (For more information about choice and lookup columns, see “Choose a Column Type,” later in this chapter.)

Solution: To add a column to a list or document library, select the Create Column option from the Settings menu in any view of the list or document library, as shown in Figure 7.5.


Tip – The Create Column option creates a new column in the list or library but does not let you select from the site columns that are already set up in the site. To learn how to add an existing site column to the list or library, see “Add a Site Column to a List or Document Library,” later in this chapter.


Choosing the Create Column option opens the page where you can define the type of column you want to add, as well as set the settings on that column (see Figure 7.6).

FIGURE 7.5

Open the Settings menu and choose the option to add a column to the list or library.

FIGURE 7.6

Creating a new column.

The first choice to make is the name of the column. Column names must be unique in the list (you cannot have two columns with the exact same name).

After choosing the name for the column, you must choose the type of the column, as shown in Figure 7.6. There are numerous types of columns, and developers may add to those types, so you might see more than the built-in types. Also, as mentioned earlier in “Create a New Survey,” creating a new column in that list (also known as creating a new question) will show more options that are not available for standard list types.

All column types require you to choose a name for the column. They also allow you to specify the description for the column and whether the column is required (making the column mandatory in the list—forcing the user to fill it in when creating or editing an item), and whether the column should be added to the default view of the list or library (see Figure 7.7). Other than the column type all options can be modified in the future. Changing the column type for a column is possible but is limited to certain column types. For more information about modifying a column see “Change or Remove a Column in a List or Document Library,” later in this chapter.

FIGURE 7.7

Defining the settings for a new column.

However, each column type can offer different configuration options for that column; for example, a Single Line of Text column type has a Maximum Number of Characters setting, whereas Multiple Lines of Text column type has a Configuration option for how many lines it should allow. For more information about choosing a column type and the different configuration options that each type may have, see “Choose a Column Type” later in this chapter.

Add a Site Column to a List or Document Library

Scenario/Problem: You want to add an existing site column that has been defined in the site to an existing list or document library.

Solution: As explained in Chapter 1, “About Microsoft SharePoint 2007,” a site column is a column that is defined on the site level rather than on the list or library level. Reusing those columns in lists and libraries makes a lot of sense. If a change to the column setting is required in many lists and libraries, it is possible to change the column at the site level once, and that updates all the lists and libraries using that column.

If you want to use an existing site column instead of creating a new column, open the list’s or library’s settings page by opening the Settings menu in the toolbar for that list or library, and choose either List Settings or Document Library Settings (see Figure 7.8).

FIGURE 7.8

Getting to the list settings of a contacts list.

In the list’s or library’s settings page that opens, scroll down to the Columns section of the page. Here, you see the list of all the columns that have been added to the list or library. In this section, click the Add from Existing Site Columns link. This selection opens a page that enables you to pick one or more site columns to be added to the document library or list (see Figure 7.9).

To choose a column, locate it in the Available Site Columns box, select it, and click the Add button to add it to the Columns to Add box. If you regret your choice and want to undo it, select the column in the Columns to Add box and click the Remove button.

To more easily find a column, you can filter the columns that are in the Available Site Columns box by choosing the group for the column. Site columns are grouped in logical groups. For example, the Core Document Columns group holds columns that are commonly used by most documents: Author, Comments, Date Created, and so on. By default, you see the site columns from all groups available to you. To choose a different group, open the Select Site Columns From drop-down box and select a different group.

FIGURE 7.9

Choosing site columns for the list or library.


Tip – When adding a site column, you cannot specify any settings on it because any column settings are defined in the site level. However, after adding the column, you can modify it like any other column (see the instructions in “Change or Remove a Column in a List or Document Library,” later in this chapter).


Choose a Default Value for a Column

Scenario/Problem: You want to define a default value for an existing or new column in a library or list. For example, in some instances you want date columns to default to the current day’s date or text columns to default to the current user’s name; or for choice columns, where the user can choose from multiple choices, you want to select one of the choices as the default.

Solution: Some types of columns can have default values. Default values appear in the column when a user is creating a new list item or is uploading a new file, but the user can then choose to change the value.

Some column types allow more advanced settings for default values than others, and the specifics for those column types are covered under “Choose a Column Type,” next.

Choose a Column Type

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 (apart from 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 that type.

Single Line of Text

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

FIGURE 7.10

The First Name column in a contacts list is an example 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 define the maximum number of characters allowed in the field (up to 255 characters) and the default value for the column (see Figure 7.11).

FIGURE 7.11

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 option Text, 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 a text (that the user can change) saying who purchased an item. The default will be the name of the current user filling the form, but the user might be filling the form for someone else, and the text might need to be changed. Figures 7.12 and 7.13 show how to configure this and how it will look to the users.

FIGURE 7.12

Defining a calculated default value.

FIGURE 7.13

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 (line breaks are allowed). It can be configured to allow different editing options for the user, as can be seen in Figure 7.14.

As shown in Figure 7.14 the column type can be configured to allow rich formatting of the text—you can make parts of the text bold; underlined; a different font or color; and even include pictures, tables, and links. This configuration is not available in document libraries, and you will see it only when adding a site column or a column in a list. The settings for this column type are shown in Figure 7.15.

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

Number of Lines for Editing

The Number of Lines for Editing setting determines how many lines will be displayed in the editing box for the text. This can be any number from 1 (only one line will be displayed, but users can still scroll down or up in the box) to 1,000. This setting does not affect the length of the text that can go into the column, just the appearance of the editing box (refer to Figure 7.14).

FIGURE 7.14

Different configurations of the Multiple Lines of Text column.

FIGURE 7.15

Defining the settings for a Multiple Lines of Text column type.


Tip – It is recommended to keep the number small in the Number of Lines for Editing setting so that the column editing box doesn’t take a huge amount of space in the editing form.


Specify the Type of Text to Allow

In the Specify the Type of Text to Allow setting, you can specify the type of text that can be entered in the editing box. The simplest option is Plain Text, which allows just simple, unformatted text (refer to Figure 7.14). The users will not have options to make any part of the text bold or a different font.

The next option is Rich Text, which enables the users to set formatting on parts of the text and set the font, font size, alignment, color, and other kinds of formatting that are common when writing rich text.

The last option, Enhanced Rich Text, allows even more special formatting, such as making parts of the text into hyperlinks, adding images to the text, and creating tables.

Append Changes to Existing Text

The last option, Append Changes to Existing Text, lets you configure what happens when someone edits the value of the column in a list item or a file. By default, the setting is No, which means that when someone edits the value, the value just changes to the new value. Users who then view the properties of the list item or file see the new value, not the old one. If they want to see the old one, they must open the list item’s or file’s version history, if versioning is configured in the document library.

However, choosing Yes here changes how the column is displayed when users view the properties of the list item or file. Instead of seeing just the current value, they also are shown the entire history of what the value was before, including who made the change and when. This option can be turned on only when versioning is enabled on the list or library because SharePoint must track the old versions of the value to show this information. For information about how to configure versioning on the list or library, see “Change the Versioning Settings for a List or Document Library,” later in this chapter.

When the Append Changes option is enabled, the old entries and the current one appear under the editing box for the column. If there are no old entries, that is shown also, as shown in Figure 7.16.

FIGURE 7.16

The Address column shows there haven’t been any old values.

When there are old entries, such as corrections to a value, they are shown to a user viewing the item as a list of values, complete with who wrote the value and when (see Figure 7.17).

FIGURE 7.17

The Address column shows the history of changes when viewing the properties of a list item.

When you are editing a list item of a file, the list of values appears below the editing box for the column, while the edit box itself does not have anything in it (see Figure 7.18).

FIGURE 7.18

The Address column shows the history of changes when editing the properties of a list item.

Choice (Menu to Choose From)

A choice column is often used when you want the users to choose from a list of options for the value of the column in different configurations; for example, a list of regions or countries, as shown in Figures 7.19 through 7.21, with different controls appearing to the user.

FIGURE 7.19

A choice column allowing users to select one or more choices from a list.

FIGURE 7.20

A choice column allowing users to select only one choice, using the drop-down menu configuration.

FIGURE 7.21

A choice column allowing users to select only one choice, using the radio buttons configuration.

Choice columns enable you to specify the values you want the users to choose from, and you can configure them to allow the users to either make a single selection or select multiple values from the list (see Figure 7.22).

FIGURE 7.22

The configuration options for a choice column type.

Specify the Choices

To specify the choices that users will be able to choose from, simply type the choices in the box titled Type Each Choice on a Separate Line (refer to Figure 7.22). Use a line break to separate choices. For example, for a list of countries, type the countries in the box with a line break between each country name.

Choose How the Choices Will Be Displayed

The next configuration setting you can set is how the choices will be displayed to the user when making the choice. The first two options, Drop-Down Menu and Radio Buttons, enable the users to select only one option from the list of choices, whereas the last option, Checkboxes, allows multiple selections of values.

The Drop-Down Menu option is useful when you have a lot of choices and don’t want to overwhelm the user who has to make the choice. The values appear in a drop-down menu, which opens to reveal the list of choices (refer to Figure 7.20).

The Radio Buttons option is useful when the list of choices is small and will not take a lot of space on the page. The advantage of this option is that the user sees all the options on the page without having to open a drop-down menu (refer to Figure 7.21).

The Checkboxes option is useful when you want the users to be able to choose more than one option (refer to Figure 7.19).

Allow Fill-in Choices

When you choose to allow fill-in choices, the column enables users to type a value if the value they are looking for does not exist in the list of choices you chose (see Figure 7.23). The values that users type are not added to the list.

FIGURE 7.23

When the Allow Fill-in Choices option is enabled, users can type the value manually.

Default Value

As in most other column types, you can type a default value that will be selected when the user creates a new item. If you want nothing to be selected by default, clear the Default Value box; otherwise, make sure you type in the Default Value box the exact text of one of the choices.

Number (1, 1.0, 100)

The Number field is useful when you want to capture a numeric value. With this column type the user will be asked to type a number in a text box. For example, you might ask for a 1 to 10 rating for a document or the number of products in stock, and so on. Figure 7.24 shows the settings for this column type.

FIGURE 7.24

The configuration options for a Number column type.

Minimum and Maximum

The first option you can configure for a Number column is the minimum and maximum numbers that the user can choose in the value.

Number of Decimal Places

In the Number of Decimal Places option, configure how many decimal places the value can have. Choosing the value 0 does not allow fractions of numbers, and only integers are allowed. Choosing the value 1 enables users to specify numbers with one decimal place, such as 15.4, while choosing the value 2 allows a precision of two decimal places, and so on up to five decimal places. The default option for this setting is Automatic, which will display how many decimal points are in the entered number.

Show as Percentage

Choosing the Show as Percentage option causes the value entered in this column to be displayed as a percentage.

Default Value

Like other columns, this column supports a default value that you can enter as a static default value or as a calculated value. This column supports many mathematical formulas using standard arithmetic operators (such as +, -, * and /) to perform calculations. For example, you can have a calculated default value of =128+10, which results in a default value of 138. Another option is to use special functions in the calculation. Number columns support such functions as Pi(), which returns the number for Pi; AVERAGE(), which returns the average of the numbers you give it; and MAX, which returns the biggest number in the list of numbers you give it.


Note – As you can see, having calculated defaults for the number column is not extremely useful; essentially, you are typing in a static number. However, these formulas do work in this column type, and you might find a use for them. To take full advantage of these formulas, see the “Calculated (Calculation Based on Other Columns)” section later in this chapter. More information about the types of formulas and how to use them can be found at https://tinyurl.com/SPcalculated.


Currency ($, ¥, €)

The Currency column type is almost exactly the same as the Number column type. Figure 7.25 shows the settings section for this column type.

Currency Format

The only option that is different in the Currency column type from the Number column type is the Currency Format. This option determines what symbol will be used next to the value when displaying the value in the item’s or file’s properties. For example, choosing United States displays values with the dollar sign ($) next to the value, while choosing one of the European currencies displays the Euro sign (€) next to the value.

FIGURE 7.25

The configuration options for a Currency column type.

Date and Time

The Date and Time column type lets users specify a date or a date and time as the value for the column. For example, in a calendar list, users can specify the start date and time of a meeting. However, for a list of contacts, if you want a column with the birth date of a contact, for example, you need to configure the column to ask only for the date, not for the time. Figures 7.26 and 7.27 show the two modes for this column.

FIGURE 7.26

A date and time column showing only dates.

FIGURE 7.27

A date and time column showing date and time.

Figure 7.28 shows the configuration options for this column type.

FIGURE 7.28

The configuration options for a Date and Time column type.

Date and Time Format

In the Date and Time Format configuration option, you can choose whether the users can choose just a date or a date and time. This choice changes what the date choosing control looks like.

Default Value

You also have the option to choose a specific date or make the current date the default. Also, you can use the Calculate Value option and set a default that calculates based on the current date using the [Today] token. For example, to set the default to be two weeks from the current date, type [Today] +14 in the calculated value. This capability is useful when you want to use a column as an expiry date, for example, while allowing the users to change the expiry date. You can set the default value to be two weeks in the future from creating the list item or file, but the user can still change the date manually.


Note – It might be worthwhile to note that if a user just selects a time and not a date, SharePoint will not save anything in the column. To avoid this, setting a default date value for the column is very helpful.


Lookup (Information Already on This Site)

A Lookup is one of the most useful column types. It is similar to the Choice column type in that the users get to choose from a list of values (refer to Figure 7.20 earlier in this chapter for an example how this appears to users). However, unlike the Choice column type, the Lookup column type does not store the choices in the settings of the column. Instead, the choices are in another list or library.

For example, if you create a SharePoint list in the site and enter a list of countries in that list, you can use the Lookup column type to show values from that list. This feature is helpful when you want other users to be able to manage the list of choices. The other users do not need permissions to change settings on the current list; they just need the permissions to change items or files in the list of values (the remote list).

Unlike the Choice column type, though, in the Lookup column type the values that users pick show up as links to the list item or file that was selected. This can help create a complicated system of lists connected to one another—for example, a list of orders connected to a list of products. When users create a new order, they can choose a product (or products), and when they view an order, the product name appears as a link to the product list item.

Figure 7.29 shows the configuration options for this column type.

Figure 7.29

The configuration options for a Lookup column type.

Get Information From

In the Get Information From field, you specify which list has the information you want to display to the user to choose from. The choices here are the available lists in the current site. It is not possible to reference a list from another site.

In This Column

In the In This Column configuration option, you specify which column in the list to which you are connecting will be displayed to the user as the possible values. For example, the most common choice for this setting is the title column, which displays the titles of the list items or files as the options for the user to choose from.

Allow Multiple Values

As you can do with the choice column, you can have this column enable users to choose more than one value. When you select the Allow Multiple Values option, the user interface for selecting values changes, allowing the users to select multiple values, as shown in Figure 7.30.

FIGURE 7.30

The user interface for selecting multiple values in a lookup column type.

Yes/No (Check Box)

The Yes/No column type is one of the simplest column types available. It enables the user to select either Yes or No by selecting or clearing a check box. The only configuration option you can set for this column type is the default value for it: Choose either Yes or No. An example is shown in Figure 7.31.

FIGURE 7.31

An example for the user interface for a Yes/No column type.

Person or Group

The Person or Group column type enables users to pick a value from a list of users or groups (see Figure 7.32).

FIGURE 7.32

The user interface for entering data in the Person or Group column type.

An example of this column type can be found in the tasks list, where users who want to assign a task to other users choose from the list of users to whom they want to assign the task. The selected values appear as the names of the users picked when a user views a list item or a file’s properties, with the name being a link to the chosen user’s properties page. As you can do with lookup columns, you can configure whether this column type allows multiple selections. This can be seen in Figure 7.33.

FIGURE 7.33

The configuration options for a Person or Group column type.

Allow Multiple Selections

The Allow Multiple Selections configuration option lets you define whether the column will allow users to pick more than one user in this column.

Allow Selection Of

The Allow Selection Of configuration option defines whether the user will be able to pick only people (other users) or also groups. If you want groups to be selectable, you must change this option.

Choose From

In the Choose From configuration option, you specify what users and groups will appear to the user to pick from. By default, this option is set to All Users, which enables the user to choose from the list of all the users that SharePoint recognizes, even users who do not have access to the current site or list. The second option is to limit the selection to users in a specific security group in the current site or site collection. This option is useful if you want to let users select from a restricted list of users, in which case you should create a security group and set the column to show only users from that group.

Show Field

In the Show Field configuration setting, you define what will be displayed as the selected value when a user views the list item or file properties (see Figure 7.34). The default is the name of the user who was selected, together with that user’s presence information (whether that user is online or busy, and so on; this requires a special instant messaging software installed and configured on the user’s machine to work). However, you can change this option to display other information about the selected user, as can be seen in Figure 7.34.

FIGURE 7.34

Choose what should be displayed for the user when viewing the selected value.

The Hyperlink or Picture column type enables users to enter data that will be displayed as either a link or a picture when the value is viewed (see Figure 7.35). Choose this column type when you want the users to freely type a link to a web page (in SharePoint or otherwise) or to a picture.

FIGURE 7.35

The user interface for entering data into a Hyperlink or Picture column type.

Format URL As

The only setting to set on a Hyperlink or Picture column type, Format URL As determines how to format the link that the user types when he views the list item’s or file’s properties. The first option is to format it as a hyperlink, which will display the title that the user chose as a link to the page the user chose. The second option is to format as a picture, which will show the picture to which the user typed the link instead of showing the link itself.

Regardless of what settings you choose, the user interface looks the same: The user is asked to enter a URL path and a title (refer to Figure 7.35). However, when you’re looking at list views and viewing the properties of a list item or file, the difference is apparent (see Figures 7.36 and 7.37).

FIGURE 7.36

A view showing a column configured to show the data the user typed as a picture.

Calculated (Calculation Based on Other Columns)

A Calculated column type does not allow the user to enter data in it; it is used only to show data based on a calculation of other columns. This column type does not have a user interface for entering data because the data in it is a calculation of other data. For example, if you want a Full Name column that displays information automatically based on the First Name and Last Name columns, you can create a calculated column that concatenates the values in those two columns.

Another example is in a list of orders that has a column for the number of products ordered and another column for the price for a single product; the calculated column can display the total revenue for the order by multiplying the numbers in the two columns.

FIGURE 7.37

A view showing a column configured to show the data the user typed as a hyperlink.

The configuration options for this column type include a special “formula builder” control that enables you to specify the calculation required for the column, as can be seen in Figure 7.38.

FIGURE 7.38

The configuration options for a Calculated column type. The formula in this figure is concatenating two columns and a piece of text.

Formula

In the Formula text box, you can define the calculation that will be performed (refer to Figure 7.38). You can select the columns on which you want to perform a calculation from the list on the right, and click Add to Formula to add a reference to that column in the formula.

For example, to concatenate two text columns, add the two columns from the list and use the ampersand (&) character to connect them. You can also add a piece of text in quotation marks. The value is automatically displayed everywhere, including in list views and when you’re viewing the list item’s or file’s details.

For a complete list of formulas that you can use, see https://tinyurl.com/SPcalculated.

The Data Type

The second option you need to configure for the Calculated column type is the data type that will be used for the calculation. Select the appropriate data type that matches the data type of the columns for which you are performing an operation. It is possible to perform an operation on columns of different types. For example, you can multiply the value in a Number column by the value in a Currency column, but you must decide how the result of the operation will be displayed—either as a number or as currency.

Rating Scale

This column type is available only in surveys. It is used when you want the user to rate several items in a Likert scale control. It’s like asking many questions in one column, where the answer for each question is a number. These questions are referred to as the subquestions of the column.

For example, you might want to gather input on user satisfaction on several aspects of a service, or you might want to know how much they agree with certain statements about different aspects of a book (see Figure 7.39).

FIGURE 7.39

The rating scale column data entry user interface.

This column type is useful in surveys where you want to assess how users feel on multiple subjects—it gives the user an easy interface to answer many questions quickly. You can configure this column to specify what questions will be included, what ratings the user can choose, and what the values mean. The configuration page for this column type appears in Figure 7.40.

FIGURE 7.40

The configuration page for the rating scale column type.

Type Each Subquestion on a Separate Line

This is where you specify the subquestions that appear to the user to rate. Type each one in a separate line, as shown in Figure 7.40.

Number Range

In this setting you specify the range of numbers the users can choose from when rating your subquestions. You can choose any number from 3 to 20.

Range Text

Here you specify the text that will be displayed above the low, medium, and high rating options. This helps the user realize what the numbers mean. For example, in Figure 7.39 the number 1 means Disagree, while the number 3 means Somewhat Agree and number 5 is Agree.

Show N/A Option and N/A Option Text

These options enable you to specify whether you want to allow the user not to rate some of the subquestions. This is useful if the user might not have an answer for one of the subquestions. If you select that you want the option to be available, you can also change the text shown for the option. For example, in Figure 7.40 the text was modified to “I don’t know.”

Page Separator

This column type is also unique to surveys. It enables you to add a page break between questions, so if you have a very long survey a user is not presented with a single page with all the questions on it, but instead with a subset of the questions and a Next button to go to the next page.

A page separator does not have any settings that you need to set. You can’t even give it a name.

Business Data

The Business Data column type is available only when you have Microsoft Office SharePoint Server (MOSS) installed. It is used in a similar fashion to the Lookup column type, but instead of allowing the user to select a value from a list in the current site, it shows the user values from a business application that the administrator or developer has set up.

A common example for this is a company that has a database with information about customers. Instead of migrating that information into a SharePoint list, the administrator configures a business data application integration, after which you can create columns that will allow the users to pick from the list of customers that exist in that database. By default, no business application is configured, so this column type is used only after developers and administrators have configured it. Figure 7.41 shows the configuration options for this column type, when a business application and type are selected.

FIGURE 7.41

The configuration options for a Business Data column type, with a business application and type selected.

Type

In the Type selection box, select what the column will connect to. Click the address book icon and a dialog box appears showing you all the entities that you can select from and to what business application they belong. If no application is configured in your system, the dialog tells you so.

In the dialog you can search for the entity you want to allow the users to select (for example, Product) and select it. After you select an entity, more options you can set on the column become available (see Figure 7.42).

FIGURE 7.42

Displaying more than one column in a Business Data column.

Display This Field of the Selected Type

The Display This Field of the Selected Type option enables you to select what field from the database would be used as the title field for the selection that the user made. For example, in the Product entity, choosing the Product Name field makes a lot of sense. However, you might want to pick the Product Serial Number field instead.

Display the Actions Menu

The Display the Actions Menu option enables you to select whether an Actions menu should be displayed when a user moves the mouse cursor over a value in the column. Some entities can have actions that the developer has developed for them, such as Show Product or Delete Product. To see the list of actions available for an entity, select this option and then see what actions show up.

The Link This Column to the Profile Page option determines whether the values appear as links. When this option is clicked, the user is redirected to a profile page for the entity. For example, when showing the name of a product, the name appears as a link that, when clicked, will open a page with more information about the product and actions to perform on the product.

Add a Column to Show Each of These Additional Fields

You might want to display more information than just the name of the selected entity when users are viewing the list item’s or file’s properties. The Add a Column to Show Each of These Additional Fields option enables you to select more properties of the entity that will be displayed as if they are separate columns when viewing the properties of the list item or file, even though, when editing the properties, the column is shown as only one (refer to Figure 7.42).

 Change or Remove a Column in a List or Document Library

Scenario/Problem: You want to modify the settings of a column in a list or library. For example, you want to change the default value for the column, change the column’s title, or add or remove choices for a choice column.

Solution: To change a column’s setting in a list or document library, go into the list or document library’s Settings screen by opening the Settings menu in the toolbar for that list or library and choosing either List Settings or Document Library Settings (refer to Figure 7.8).

In the list or library settings page, scroll down to the Columns section of the page. Here, you see the list of all the columns that have been added to the list or library. Click the title of the column you want to modify or remove from the list or library. Doing so opens the settings page for that column (see Figure 7.43). In this page you can either modify the column (rename it, change its settings, or even change its type) or delete the column using the Delete button at the bottom of the page.


Note – Some columns cannot be deleted, and the Delete button is not displayed for those columns. These built-in columns are an integral part of SharePoint and cannot be removed from lists and libraries.


FIGURE 7.43

The settings page for the Contact’s Birthday column.


Caution – Changing the type of a column can have significant repercussions. You can lose data if you move from one column type to another. For example, switching from any type of column to a choice column causes any value that doesn’t exist in the choice list to be lost.


Change the Order of Columns in a List or Document Library

Scenario/Problem: You want to change the order in which columns are displayed to the user when either entering the values for the columns or viewing the details for a list item or file. For example, in a contacts list you might want the users to enter the first name before entering the last name.

Solution: To change the order of columns in the data entry page for a list or library (but not in the views), go into the list’s or document library’s settings screen by opening the Settings menu in the toolbar for that list or library and choosing either List Settings or Document Library Settings (refer to Figure 7.8). (If you want to change the order of columns in a view, see “Specify the Order of the Columns in the View” in Chapter 8, “Creating List Views.”)

In the list or library settings page, scroll down to the Columns section. Here, you see the list of all the columns that have been added to the list or library.

Click the Column Ordering link that is under the list of columns. Doing so opens the page that allows you to reorder the columns (see Figure 7.44).

FIGURE 7.44

Reordering the columns in a list or library.

In this page you can specify for each column what should be its order by using the drop-down boxes to the right of the column names. If you change the order for one column—for example, change mobile phone to be the third column—the column automatically moves to the place you have selected, pushing the other columns down as necessary.

When you are finished ordering the columns to your liking, click OK at the bottom of the page.

Branching in Surveys

As mentioned earlier in “Create a New Survey,” surveys have a special capability to redirect users to different questions based on the answers to previous questions. This is known as branching.

For example, if you create a survey with three questions: “Did you read the book?”, “Do you plan to read the book?”, and “Was the book good?” you can assign a branching on the first question so that if the users answered Yes they are redirected to the third question. If they answered No they are redirected to the second question. The second and third question will not be shown when the survey interface is first shown to the users, but after answering the first question, the users will have a Next button that allows them to continue to the next question in the branch. Figure 7.45 shows how branching looks to the user.

FIGURE 7.45

Branching in a survey. The user sees only the first question, with a Next button to go to the next question, depending on the answer.

To define the branching, first create all the questions, and then edit the columns you want to be conditional so that they have the branching. You don’t need to add page separators unless you want to—the survey will automatically split the questions into different pages depending on the branching. Figure 7.46 shows how to define the branching on the first question to redirect the users based on the answer to different questions.

FIGURE 7.46

Defining branching in a survey.

Add a Site Column to a List or Document Library

As explained in Chapter 1, a site column is defined on the site level rather than on the list or library level. Reusing those columns in lists and libraries makes a lot of sense; if a change to the column setting is required in many lists and libraries, it is possible to change the column at the site level once, and that updates all the lists and libraries using that column.

If you want to use an existing site column instead of creating a new column, open the list’s or library’s settings page by opening the Settings menu in the toolbar for that list or library and choosing either List Settings or Document Library Settings (refer to Figure 7.8).

In the list or library settings page, scroll down to the Columns section. Here, you see the list of all the columns that have been added to the list or library. In this section, click the Add from Existing Site Columns link. This opens a page that enables you to pick one or more site columns to be added to the document library or list (refer to Figure 7.9).

To choose a column, locate it in the Available Site Columns box, select it, and click the Add button to add it to the Columns to Add box. If you regret your choice and want to undo it, select the column in the Columns to Add box and click the Remove button.

To more easily find a column, filter the columns that are in the Available Site Columns box by choosing the group for the column. Site columns are grouped in logical groups. For example, the Core Document Columns group holds columns that are commonly used by most documents: Author, Comments, Date Created, and so on. By default, you see the site columns from all groups available to you. To choose a different group, open the Select Site Columns From drop-down box and select a different group.


Tip – When adding a site column, you cannot specify any settings on it because any column settings are defined in the site level. However, after adding the column, you can modify it like any other column (see the instructions in “Change or Remove a Column in a List or Document Library,” earlier in this chapter.)


Rename a List or Document Library or Change Its Description

Scenario/Problem: You want to rename a list or document library, or you want to change the description shown for that list or library. For example, a library might have been created with the name Documents, and you want to modify it to a name that tells the user more about the types of documents that should be uploaded to that library—Management Presentations, for example.

Solution: If you want to change an existing list’s or library’s title or description, open the list’s or library’s settings page by opening the Settings menu in the toolbar for that list or library and choosing either List Settings or Document Library Settings (refer to Figure 7.8).

At the top of the page, under the General Settings section, click the Title, Description and Navigation link (see Figure 7.47).

FIGURE 7.47

Click the Title, Description and Navigation link to get to the list’s or library’s General settings page.

On the page that opens, shown in Figure 7.48, you can set a new title to the list or library, change the description, and choose whether a link to the list or library should appear in the left navigation bar (the quick launch).


Note – Changing the name of a list or library does not change the link to that list or library. The link stays the same, but the title that is displayed changes.


FIGURE 7.48

Changing the list or library name, description, and navigation options.

Change the Versioning Settings for a List or Document Library

Scenario/Problem: You want to change how a list or library deals with storing versions for the documents and list items. For example, a document library might have been created with versioning turned off, and you want to turn it on. Or a library was created and configured to have versioning but not to support automatic check-out of a document when a user opens a document for editing, and you want to change that.

Solution: If you want to change the versioning settings for a list or library, open the list’s or library’s settings page by opening the Settings menu in the toolbar for that list or library and choosing either List Settings or Document Library Settings (refer to Figure 7.8).

At the top of the page, under the General Settings section, click the Versioning Settings link (refer to Figure 7.47).

In the versioning settings page, you can define how the list or library will create versions for list items or files. This page is different for lists and libraries because documents and list items behave differently.

Set the Versioning Settings for a List

The first setting for versioning in a list is whether content approval is going to be required (see Figure 7.49). This option is not strictly about managing versions of the list item, but rather about the publishing process of a modification to a list item. If you select this option, every time a modification is made to a list item (or when one is created), the list item is not displayed to all users automatically. Instead, the list item gets an approval status of pending, and no one can see it except its author and people with permissions to view drafts in the list—until a person with the permissions to approve items in the list approves that item, thereby changing its status from Pending to Approved.

FIGURE 7.49

The Versioning settings page for a list.

The next section is Item Version History. Here, you can define whether versions will be tracked for the list and how many versions should be kept. This second option is optional, and you can leave it unlimited if you want to. Finally, if you set the Require Approval option, you can also limit the number of approved versions to keep.

The last option in this page, Draft Item Security, is also valid only if you chose to require approval. It lets you define who can see draft items that have not been approved yet. The options are any user who can read items in the list, only users who can edit items in the list (who might need to be able to see the drafts to edit them), or just the people who can approve items in the list (which is the minimum required because they must be able to view the drafts to approve them).

Set the Versioning Settings for a Document Library

The versioning options for a document library are almost identical to those of a list (see Figure 7.50). The only two differences are explained here.

FIGURE 7.50

The Versioning settings page for a document library.

The first option that is different is that, instead of just selecting that the library should store versions, you can select how versions will be stored: either as major versions (which is how lists behave) or so that any change will result in a new version (changing the version number from 1 to 2 to 3, and so on).

This setting does not enable you to specify that a certain change is not major enough to warrant an increase of the version number for the document. For example, if you change a document by spell checking it and correcting the spelling, or updating the date it was last printed, this change might not be important enough. This is why you might want to choose the option for major and minor versions, which allows users to decide whether the change is major, thereby increasing the version number by 1, or minor, thereby increasing the number after the decimal point for the number.

The second option that you can configure for document libraries only is the Require Checkout option. Selecting this option can help reduce conflicts when several users want to work on the same file. This option forces the users to check out a file before editing it by automatically checking out the file for them, which prevents others from editing it. This prevents users from forgetting to check out the file but starting to work on it, not realizing that another user is also working on the same file.


Caution – It’s important to remember that when the Require Checkout option is selected, uploading multiple documents will add those documents as checked out, and they will not be visible to other users until you check them in.



Caution –There is no automatic check-in of a file because SharePoint cannot know when the editing is done and the user is ready to check in the changes. Users therefore must be aware of this fact, and get used to checking in the files and not keeping them checked out forever, not sharing their changes with their colleagues.


Change the Document Template for the New Button in a Document Library

Scenario/Problem: You want to change what kind of document is created when the user clicks the New button in a document library. For example, you want to make the New button create a Microsoft PowerPoint presentation out of a specific template in the document library that is specific for presentations, or you want a Microsoft Excel template for expense reports to open in the Expense Reports document library.


Tip – You might want to show several choices of templates to users as a menu under the New button. That is possible if you use content types. See “Add a Content Type to a List or Document Library,” later in this chapter, as well as “Create a Content Type” in Chapter 13 for more information.


Solution: If you want to change the template or application used when a user clicks the New button in a document library, you can specify it in the document library settings. Do so by opening the Settings menu in the toolbar for that list or library and choosing Document Library Settings to get to the settings page for the document library (refer to Figure 7.8).

At the top of the page, under the General Settings section, click the Advanced Settings link (refer to Figure 7.47). On the page that appears, you can either edit the template that is used by clicking the Edit Template link on the right side, or link to a Microsoft Office Document that you have uploaded to SharePoint (see Figure 7.51). Make sure the link to the document that you entered works by clicking the Edit Template link after adding the link.

FIGURE 7.51

Change the link to the template for the new button by changing the Template URL.

It is recommended that you upload to the Forms folder that exists in any document library. That folder is hidden, and users do not see it in list views, which means they will not see your template as a file to be modified and managed. However, you can decide to put the template in another location, not in the current document library. Just remember that this location must be readable by all users, and not just you. Therefore, putting the document in another location can be problematic from a security point of view because you must be sure that all the users who are allowed to create documents in the document library are also allowed to read from the location of the template.


Tip – To get to the Forms folder, type the link to the document library, followed by /forms/. For example, if the link to your document library is http://sharepointlocal/Sample/SharedDocuments/, type the link http://sharepointlocal/Sample/SharedDocuments/Forms. This link opens the Forms folder (which should look empty), to which you can upload a document to be used as a template.


Depending on the file type that you use as a template, the corresponding application will be used when the user clicks the New button. For example, if you choose a Microsoft Excel document as the template, the Microsoft Excel application will open when the user clicks the New button.


Note – Not all file types can be used as templates. You can use only file types from applications that are compatible with SharePoint, such as Microsoft Office applications.


If you want to add several options for templates under the New button, you must do so by adding multiple content types to the document library. See the next section for details.

 Add a Content Type to a List or Document Library

Scenario/Problem: You want to add a content type that is defined in the site to a list or library. As explained in Chapter 1, content types provide a useful way to specify groups of properties for files or list items. Content types can also specify a document template for creation of a new document of that content type. For information about creating new content types, see “Create a Content Type” in Chapter 13.

Solution: To add a content type to a list or library, first enable management of content types in that list or library. To do so, go to the list or document library settings page by opening the Settings menu in the toolbar for that list or library and choosing List Settings or Document Library Settings (refer to Figure 7.8).

At the top of the page, under the General Settings section, click the Advanced Settings link (refer to Figure 7.47). On the advanced settings page, shown in Figure 7.52, select Yes under Allow Management of Content Types? and click OK at the bottom of the page.

FIGURE 7.52

On the advanced settings page, select Yes to enable content types for the list or library.

You then return to the list or library setting page, which now has a section for content types (see Figure 7.53).

FIGURE 7.53

The Content Types section appears only if content types are enabled for the list or library.

To add a content type, click the Add from Existing Site Content Types link under the Content Types section. This link opens the content type selection page, which enables you to select one or more content types to add to the list (see Figure 7.54).

FIGURE 7.54

The Add Content Types page.

On this page the available content types appear in the box on the left. Select the one you want and click the Add button to move it to the box on the right (which shows the types you selected). If you want to remove a content type you added by mistake, select it from the box on the right and click the Remove button.

When you are finished selecting all the content types you want for the list or document library, click OK. The resulting list or library settings page shows the list of content types available in the list or library.

Remove a Content Type from a List or Document Library

Scenario/Problem: You want to remove a content type from the list or library so that it is not available for the users in that place.

Solution: To remove a content type from a list or document library, go to the settings page for that list or library by opening the Settings menu in the toolbar for that list or library and choosing List Settings or Document Library Settings (refer to Figure 7.8).

The settings page shows the list of content types available in the list or library (if content types are enabled), as you can see in Figure 7.55. To remove one, click the link to that content type.

FIGURE 7.55

To remove the Link to a Document content type, click the Link to a Document link under the Content Types section.

The configuration page that opens shows the content type for that specific list or library (see Figure 7.56). Changes that you make in that page affect only the list or document library but not other lists and libraries that use the same content type. You can tell that by the fact that the content type has a parent with the exact same name—something that is possible only when viewing the settings of a content type in a list or library, and not the settings for the content type that is defined in the site. As long as you see that, changing the content type affects only the list or library from which you started.

FIGURE 7.56

The content type settings page.

To remove the content type from the list or library, click the Delete This Content Type link. Doing so opens a prompt asking you to confirm you want to delete the content type. Click OK to remove the content type.


Note – The Delete This Content Type link does not actually delete the content type; it just removes the content type from the list or library. An easy way to be sure that you are not deleting the content type from the site is to look in the breadcrumbs in the top of the page. If the breadcrumbs show that you are under the settings for the list or library, you are not deleting the content type but instead are just removing it. In any case, SharePoint does not let you delete a content type from a site if it is still in use by a list or library, so you can feel safe to click this link.


Enable or Disable Folders in a List or Document Library

Scenario/Problem: You want to enable or display folders in a list or library. For example you want to prevent users from creating subfolders in a document library, or you want users to create list items in a folder structure inside a list.

Solution: To enable or disable folders in lists and libraries, go to the list or library settings page by opening the Settings menu in the toolbar for that list or library and choosing Document Library Settings or List Settings (refer to Figure 7.8).

On the settings page, click the Advanced Settings link to get to the advanced settings page of the list or library (see Figure 7.57). On that page, choose Yes or No for the option that allows you to enable or disable folders. The Display New Folder Command on the New Menu? selection is located in the Folders section.

FIGURE 7.57

The Display New Folder option.

© Copyright Pearson Education. All rights reserved.