Creating SharePoint Lists

In SharePoint, you can get a lot of mileage out of something as simple as a list. This four=part article series shows you how. It is excerpted from Essential SharePoint 2007, Second Edition, A Practical Guide for Users, Administrators and Developers, written by Jeff Webb (O'Reilly, 2008; ISBN: 0596514077). Copyright © 2008 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Contributed by
Rating: 5 stars5 stars5 stars5 stars5 stars / 10
December 31, 2008
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement

SharePoint lists are tables of data, much like Excel spreadsheets. In Chapter 2, I showed you how to create lists from spreadsheets. But lists can do a lot more than just store columns and rows of data—in fact, lists are like mini-applications in SharePoint.  

I’ve organized this chapter to follow the steps I use when creating new list-based applications for my clients:

  1. Create a list using one of the built-in templates.
  2. Add columns to collect additional data and calculate values as required.
  3. Create supporting lists for lookups and master lists.
  4. Add views to display required reports.
  5. Enable email, versioning, and item approval as required.
  6. Optionally customize the data entry forms.
  7. Save the final list as a template and deploy it to other site collections.

That’s similar to the process I showed for creating sites: start with what’s provided, customize, get approval, and deploy. Don’t skimp on the approval part of that process—it’s a lot harder to change lists once they are deployed. Get agreement that the prototype you’ve created meets the stated needs before you save it as a template and deploy it across multiple sites.

This chapter builds on the Phone List sample we created together in Chapter 1. If you skipped that, you’ll want to go back and do it now. I also introduce the Problem Reports application, which is based on the Issue Tracking list template.

Using Built-in List Templates

SharePoint provides a set of built-in list templates that you can start from and customize as needed. Tables 4-1 and 4-2 describe the list templates that come with SharePoint.

Table 4-1. Built-in list templates

Category

List

Use to

Communications

Announcements

Share news, status, and other time-sensitive information.

Contacts

Collect and store phone numbers, email addresses, and other information about employees or external contacts. Contact lists can be shared with Outlook.

Discussion Board

Create threaded discussions among team members. Discussion boards are similar to newsgroups.

Custom Lists

Custom List

Create a new list starting with basic columns and a standard view.

Custom List in Datasheet view

Create a new list starting with basic columns and a datasheet view.

Import Spreadsheet

Create a new list with columns and data from a spreadsheet. Includes a datasheet view.

Tracking

Links

List web pages and other resources related to a task or project.

Calendar

Track events, milestones, and deadlines that can be displayed graphically as a calendar page. Calendar lists can be shared with Outlook.

Tasks

Track work items.

Project Tasks

Track work items that can be displayed graphically in a Gantt Chart.

Issue Tracking

Assign issues or problems to individuals and then track the progress of the resolution.

Survey

Poll individuals using a series of questions and display the results graphically.

Table 4-2. Additional list templates provided by MOSS

Category List Use to
Custom Lists Languages and Translators Add languages and translators used by the Translation Management workflow.
 KPI List Track and display progress toward a set of goals graphically.

As with site templates, it’s a good idea to create one sample of each type of list in a gallery that site owners can browse. Then, as you create new custom lists, you can add them to the gallery. It really helps users to see the available list types before creating their own.

When you create a new site, some lists are created automatically by the site template. Figure 4-1 shows a site created from the Team Site template, which automatically includes Announcements, Calendar, Links, Tasks, and Discussion lists. See Chapter 3 for tables of what lists and libraries each site template includes.

These new lists are empty to start with: list templates define the columns that the list will contain and the views of the list items that are displayed. The list items are provided by the users. Figure 4-2 shows the parts of a Links list.


Figure 4-1.  Site templates automatically create some lists


Figure 4-2.  The parts of a list

Items

Items are the rows of data in a list. Users add new items or change existing ones.

Columns

Columns define the types of data that a list contains. The Links list contains columns for a URL and Notes as well as a set of predefined columns that SharePoint uses such as ID, Created, Created By, and so on. Those predefined columns are usually not displayed. Columns are also called fields in the Microsoft documentation.

Views

control what columns are displayed, how they appear, and what filters or grouping are applied to the rows. Views are similar to reports.

Adding Columns

The built-in list templates give you most of what you need, but you’ll quickly find that you have to make some changes to get what you want. I gave a quick example of how to create and customize a list in the Phone List example in Chapter 1, so I won’t repeat that information here, but I will go into more detail about the types of changes you can make and why you make them:

  1. Add columns to gather additional information.
  2. Add calculated columns to display information in different ways. 
  3. Add choice or look-up columns to provide new ways to group or filter items.

The following sections describe those tasks in detail.

Adding Columns to Gather Information

You can extend any list by adding new columns to it. Let’s look at the Phone List sample again to show how that works. To add an Assistant column to the Phone List:

  1. Navigate to the Phone List sample list created in Chapter 1. Tip: you can navigate to a list by clicking on the title bar of the web part that displays a list.

  2. On the list toolbar, click Settings -> Create Column. SharePoint displays the Create Column page.

  3. Complete the page as shown in Figure 4-3 and click OK. SharePoint adds a new text column to the list.


Figure 4-3.  Adding an Assistant column to the Phone List

Once you add an Assistant column, it’s up to you to add data for each row in the list. Because you selected Add to default view in Figure 4-3, Assistant automatically shows up in the main view of the list, so you can just click Actions -> Edit in Datasheet to fill in the new column. But don’t do that yet! I’ll change and expand this example shortly.

Assistant is a simple text column. Figure 4-3 lists the special uses for some of the other column types. Most of them are obvious, but I’ll explain the Calculated and Lookup columns in detail in the following sections.

Adding Calculated Columns

Use calculated columns to bring together values from other columns. For example, the Phone List contains a Full Name column that is a single line of text. Since the list already has First Name and Last Name in it, it makes more sense to create Full Name out of those two columns. To do that:

  1. On the Phone List toolbar, click Settings -> Create Column. SharePoint displays the Create Column page.

  2. Complete the page as shown in Figure 4-4 and click OK. The formula shown in Figure 4-4 is=[First Name] & " " & [Last Name]. SharePoint adds a new calculated FullName column to the list.


Figure 4-4.  Adding a calculated column to a list

  

To get help using formulas, display the SharePoint Help and click “Formulas and functions.” To display SharePoint Help, use the following link: ./_layouts/help.aspx?Key=NavBarHelpHome.

Notice that I told you to name the column “FullName.” The Phone List already has a “Full Name” column, and you can’t have two columns with the same name! We’re not using the Full Name column, so let’s delete it. To delete a column:

  1. On the list toolbar, click Settings -> List Settings. SharePoint displays the Customize page.
  2. Scroll down and click Full Name in the Columns list. SharePoint displays the Change Column page.
  3. Scroll to the end of the page and click Delete. SharePoint warns you that data for this column will be deleted. Click OK to delete the column.

Adding a Choice, Lookup, and Yes/No Columns

Use the Choice, Lookup, and Yes/No column types to structure the information entered in the column. In Chapter 1, I added a Department Choice column to the Phone List. I used the Choice type because I wanted to make sure the entries were consistent—users can only choose from the selections in the list of departments I provided. That prevents misspelled or incorrect department names and allows the Phone List to be grouped by department.

Choice, Lookup, and Yes/No column types have these advantages:

  1. Values are consistent, so grouping and filtering on these columns is effective.
  2. It’s easier to enter values, since choices are provided as drop-down lists or multiple-choice selections.
  3. Choices can be shared across lists and sites.

Let’s continue with the Phone List sample a bit more and change the Assistant column from a text column to a lookup. You can’t change the type of a column once it’s created, so we’ll have to delete the Assistant column and re-create it with the new type. (Remember, I told you not to enter data in it!) To change the Assistant column:

  1. On the Phone list toolbar, click Settings -> List Settings. SharePoint displays the Customize page.
  2. Scroll down and click Assistant in the Columns list. SharePoint displays the Change Column page.
  3. Scroll to the end of the page and click Delete. SharePoint warns you that data for this column will be deleted. Click OK to delete the column.
  4. On the Change Column page, click Create Column. SharePoint displays the Create Column page.
  5. Complete the page as shown in Figure 4-5 and click OK to create the new Assistant column.


Figure 4-5.  Creating a new Assistant column as a Lookup type

Now, you can fill out the Assistants in the phone list. To do that:

  1. On the Phone list toolbar, click Actions -> Edit in Datasheet.
  2. Click the Assistant column and then click the down arrow on the right side of the column to drop-down the list of choices.
  3. Click the choice to select the assistant as shown in Figure 4-6.


Figure 4-6.  Using the Lookup column

The Assistant column is a circular lookup. That is, you can choose any name provided that the person is already entered in the Phone List. You can use a lookup to pull data from another list in the site by selecting a different source list and column name.

Please check back next week for the continuation of this article.

blog comments powered by Disqus
BRAINDUMP ARTICLES

- Microsoft Windows 8 Committed to Cloud Compu...
- Independent Developers Favor Windows Phone 7
- Dell Introduces VMware-based Cloud
- Microsoft and Skype Agree to Acquisition Deal
- Transfer Contacts in Microsoft Outlook
- Zune`s Next Steps
- Safari Books Online Review
- Does Microsoft Get Touch Screens Now?
- Microsoft`s Record Quarterly Earnings Not En...
- Basic Operations and Registers in Assembly
- Assembly Coding within Visual C/C++ IDE
- New Microsoft Office Coming with a Twist
- Microsoft`s FUSE Labs Unveils Spindex Social...
- HP Slate with Windows 7: Dead or Alive?
- Windows Phone 7 Mobile OS to Rival Android a...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 7 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials