Creating a SharePoint list
SharePoint is built around lists. If you want to store things in SharePoint, then you will need to know how to create the different types of list. This recipe shows you how.
Getting ready
This recipe works for:
SharePoint 2010 Foundation
SharePoint 2010 Standard Edition
SharePoint 2010 Enterprise Edition
SharePoint 2010 Online (Office 365 Edition)
You require either the Design or the Full Control permission level to create a new SharePoint list.
The choice of lists that you have available is determined by the SharePoint version you have. SharePoint 2010 Standard and Enterprise editions add more lists to those already available in SharePoint 2010 Foundation.
How to do it...
Open the Site Actions menu and select the More Options menu option.
SharePoint will now show all the different types of content you can create. Filter your view by clicking on List on the left side of the window.
Choose the type of list that you want to create. Enter the name of the list and then click on the Create button.
The new list will be created and displayed. You can now add items to your list, continue to customize it, or connect it to your office applications as you wish.
How it works...
SharePoint stores information in lists, in fact almost everything in SharePoint is stored in lists. Document libraries (for storing documents), media libraries (for audio and video files), and form libraries (for storing InfoPath forms) are all just special types of lists. Lists are a fundamental building block in SharePoint.
This recipe shows you how to create a list. You need to tell SharePoint the template (meaning the type of list) that you want to create and provide some basic properties (such as the name of the list). SharePoint will then do the rest, adding the columns, views, and configuring the list as required.
Once your list has been created, you can start adding data or customize it further. There are many options and variations for doing this, which are covered in later recipes throughout this book.
There are many different list templates available. Each template provides different columns, views, and other functionality designed to support its particular function. I have listed some of the common ones in the next section.
There's more...
SharePoint Foundation provides a core set of list templates, and the Standard and Enterprise versions of SharePoint add a whole lot more. The choice of lists that you will be able to create depends on which site you are in and which features have been activated. However, some of the more commonly encountered lists are as follows:
List |
Description |
---|---|
Announcements |
A list of news items, statuses, and other short bits of information. |
Calendar |
A calendar of upcoming meetings, deadlines, or other events. Calendar information can be synchronized with Microsoft Outlook or other compatible programs. |
Contacts |
A list of people your team works with, like customers or partners. Contacts lists can synchronize with Microsoft Outlook or other compatible programs. |
Custom List |
A blank list to which you can add your own columns and views. Use this if none of the built-in list types are similar to the list you want to make. |
Custom List in Datasheet View |
A blank list which is displayed as a spreadsheet in order to allow easy data entry. You can add your own columns and views. This list requires a compatible datasheet ActiveX control such as the one provided in Microsoft Office. |
Discussion Board |
A place to have newsgroup-style discussions. Discussion boards make it easy to manage discussion threads and can be configured to require approval for all posts. |
External List |
An external list to view the data in an External Content Type. |
Import Spreadsheet |
A list which duplicates the columns and data of an existing Spreadsheet. Importing a spreadsheet requires Microsoft Excel or another compatible program. |
Issue Tracking |
A list of issues or problems associated with a project or item. You can assign, prioritize, and track the status of issues. |
Links |
A list of web pages or other resources. |
Project Tasks |
A place for team or personal tasks. Project tasks lists provide a Gantt Chart view and can be opened by Microsoft Project or other compatible programs. |
Survey |
A list of questions that you would like to have people answer. Surveys allow you to quickly create questions and view graphical summaries of the responses. |
Tasks |
A place for team or personal tasks. |
You can use this recipe to experiment with the different types of lists that you can create and get to know their functionality.
"Roll your own"—creating custom lists
If none of the SharePoint lists described earlier meets your needs, you are more than welcome to create your own. SharePoint gives you the custom list template as a basic starting point. Once you have created a custom list, you can add whatever columns, views, and custom settings you need to achieve the purpose that you have in mind. Refer to Creating a custom list in Chapter 3 for more details.
Lists to show external data
Before SharePoint 2010, SharePoint lists were limited to just displaying and updating data found within SharePoint. However, SharePoint 2010 introduced the concept of External Lists. SharePoint 2010 can now take data from an external source (such as database) and show it to users as a SharePoint list. The users can edit that information and the update will get written back to the database, all without a single line of code or a developer in site. The recipe Creating an external list in Chapter 3 shows you how to do so.
How much data can your store in a list
One of the problems with earlier versions of SharePoint was that it was easy to store too much data in a list, making the whole thing slow down. In IT speak, SharePoint lists "didn't scale well". Thankfully, SharePoint 2010 has resolved those issues and you can now store far more information in a SharePoint list than you ever really should.
The magic numbers for reference are:
Up to 30,000,000 items in a list (or documents in a document library)
Up to 400,000 major versions of a document
Up to 1,000 different security scopes (custom permissions)
8K bytes per list item (7,744 bytes reserved for custom columns)
The number of columns that you can add to a list depends on the type of columns that you add, as different columns take up different amounts of space. Column widths range from 4 to 40 bytes, and there are rules about how many of the same kind of columns you can add to a list. You can find a full list of these rules at http://technet.microsoft.com/en-us/library/cc262787.aspx#Column.
For all practical scenarios, if your SharePoint list usage is anywhere approaching these limits, then you are probably doing something wrong and I suggest you give a good SharePoint architect a call for help!
See also
Adding a slide library to share PowerPoint slides, Chapter 2
Creating a SharePoint contact list and connecting it to Outlook 2010, Chapter 2
Creating a custom list, Chapter 3
Creating an external list, Chapter 3