Microsoft SharePoint 2010 Power User Cookbook: SharePoint Applied
上QQ阅读APP看书,第一时间看更新

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...

  1. Open the Site Actions menu and select the More Options menu option.
  2. 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.
  3. Choose the type of list that you want to create. Enter the name of the list and then click on the Create button.
  4. 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:

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