Working with Custom Lists and Libraries


Chapter 2 detailed the various SharePoint 2007 list templates, which are ideal for creating a list that you want to modify or customize to suit your team’s or your individual needs. However, you may need to create a list where no existing template can serve as a starting point. This, of course, involves creating a custom list and defining all the columns and views from scratch. This section first introduces all the basic skills you need to create a custom list: how to create a list, how to make that list a template so that you don’t have to repeat work, and then how to load that template into a gallery for team use.

Once you have list customization basics under your belt, you learn about versioning items in SharePoint -you can modify either list items or documents, and save each iteration as a specific version. Certain customization options are unique to document library environments and do not apply exactly the same to a list. Next, you learn how to associate a custom document template with a library. This helps standardize the documents that your company uses to create various memos, procedures, and processes.

Custom List Basics

As you create a column within a list or library, think about what information users need about the item or how they may need to view the item. For example, if you are responsible for creating a centralized listing of projects, you may ask users the following questions:

  • What are the active projects on which the organization is working?

  • Are the projects running on a schedule?

  • Who are the primary contacts or project managers associated with each project?

  • What is the project background, and what are the primary deliverables from the project team?

  • Who is the client for whom the project is being completed?

Using the information from these questions, you can accurately create a custom list featuring the appropriate columns and views. In cases where you intend to have multiple lists for the same subject matter within an organization, you should plan the details out in the beginning, create the list, and then save the list as a template for reuse by others. This reduces the amount of repetitive work you or your team will need to perform.

The following series of Try It Outs illustrate how to work with a custom list or library. In the first Try It Out, you create a custom list with specific columns to track a project. The second Try It Out shows you how to save the list or library as a template so that others can use your work. Finally, in the last Try It Out, you see how to save the template to a gallery so that others can view and use it.

Try It Out-Create a Custom List

image from book

In this example, you create a list to represent all the projects for an organization. Based on your meetings with Project Management Office (PMO), you determine that you must implement a project list containing the columns for the project status, due date, project manager, project summary, and client. To track project information, the PMO must have this information on active projects. By clicking the project name, more detailed information on the summary should be available.

To meet these requirements, you create a list based on the Custom List template, which has just a single column called Title. To this, you must add five list-centric columns. In a real-life project, you might want to make some of these site columns so other lists and sites can use these columns. However, for simplicity’s sake, this example uses the list column model. Next, you create a custom view on your list based on the information requirements of your stakeholders. Because the PMO requested a listing of all active projects, you create a filtered view to show projects with a project status value of In Progress.

Follow these steps to create the custom list:

  1. From the main page of the site where you want to create your projects list, select Site Actions image from book Create.

  2. From the Custom Lists category, select Custom List.

  3. Enter Projects for the list name, and provide a description.

  4. Select Yes for display on the Quick Launch navigation bar.

  5. Click the Create button to continue. Your list is created with a single column for title.

  6. From the toolbar, select Settings image from book List Settings (as previously shown in Figure 4-1).

  7. From the Columns section, click the link to create a new column. The Create Column window appears, similar to what is shown in Figure 4-2.

  8. Enter the following details for your column:

    Open table as spreadsheet

    Property

    Details

    Name

    Project status

    Column Type

    Choice

    Description

    Please specify the current status of your project.

    Require That This Column Contains Information

    Yes

    Choice Values

    Not Started

    In Progress

    Complete

    Halted

    Display Choices Using

    Radio buttons

    Default Value

    Leave blank

  9. Click OK to create your column.

  10. From the Columns section, click the link to create a new column.

  11. Enter the following details for your column. Note that once you select the Date and Time option, your settings look a lot like those shown earlier in Figure 4-9.

    Open table as spreadsheet

    Property

    Details

    Name

    Project due date

    Column Type

    Date and time

    Description

    Please enter the date your project is scheduled to be complete.

    Require That This Column Contains Information

    Yes

    Date and Time Format

    Date only

    Default Value

    (none)

  12. Click OK to create your column.

  13. From the Columns section, click the link to create a new column.

  14. Enter the following details for your column:

    Open table as spreadsheet

    Property

    Details

    Name

    Project manager

    Column Type

    Person or group

    Description

    Please specify the Project Manager for this project.

    Require That This Column Contains Information

    Yes

    Allow Multiple Sections

    No

    Allow Selection of

    People only

    Choose From

    All users

    Show Field

    Name (with presence)

  15. Click OK to create your column.

  16. From the Columns section, click the link to create a new column.

  17. Enter the following details for your column:

    Open table as spreadsheet

    Property

    Details

    Name

    Project summary

    Column Type

    Multiple Lines of Text

    Description

    Describe the project by providing some background information and outlining the deliverables.

    Require That This Column Contains Information

    Yes

    Number of lines for editing

    25

    Type of Text to Allow

    Enhanced rich text (rich text with pictures, tables, and hyperlinks)

    Append Changes to Existing Text

    No

  18. Click OK to create your column.

  19. From the Columns section, click the link to create a new column.

  20. Enter the following details for your column:

    Open table as spreadsheet

    Property

    Details

    Name

    Client

    Column Type

    Choice

    Description

    Specify the client name

    Require That This Column Contains Information

    Yes

    Choice Values

    Customer A

    Customer B

    Customer C

    Display Choices Using

    Drop-down menu

    Allow Fill-In Choices

    No

    Default Value

    Leave blank

  21. Click OK to create your column.

  22. From the Views section, click the link to create a new view.

  23. Select Standard View.

  24. Specify the following details for your view:

    Open table as spreadsheet

    Property

    Details

    View Name

     

    Audience

     

    Display Columns and Order

    Select to display the columns in the following order:

    • Attachments

    • Title (linked to item with Edit menu)

    • Project Manager

    • Project Due Date

    • Client

    Sort

    Due Date (in ascending order)

    Filter

    Show items when Project Status is equal to In Progress.

    Group By

    None

  25. Click OK to create your view.

How It Works

This view includes information that is short enough for the user to view on the interface, which in this case is the Project Manager, Client, and Due Date. Because the information in the Project Summary tends to be lengthy, you omit it from the initial view, but set things up so that the users can click the Project Title column and be redirected to a details page that contains the Project Summary. After you create this view, you can allow others to use it as a template, as illustrated in the next Try It Out.

image from book

Try It Out-Save a List as a Template

image from book

Once your list is complete, members of your organization can use it. You may even want to save the list as a template so that others can use it as a starting point in the future rather than repeating all the steps you took to create this list - the last Try It Out showed just how involved this process is! Follow these steps to save a list or library as a template:

  1. From the list toolbar, select Settings image from book List Settings (the menu path is shown in Figure 4-1). The Customize Tasks window appears, as shown in Figure 4-27.

    image from book
    Figure 4-27

  2. From the Permissions and Management category, select the Save List as Template link. A window appears for you to enter information about your template.

  3. Specify a display name, file name, and description for the list template. You may also optionally select to include list content in the template if specific list items should be saved with the template.

  4. Click OK to complete the operation.

How It Works

When you save your list as a template, it appears in the site as an option under the Custom Lists column, shown in Figure 4-28, whenever a user creates a new list.

image from book
Figure 4-28

image from book

Try It Out-Upload a Template to a Gallery

image from book

Each site has its own list template gallery. After you create a list template on a separate site collection or server, you may want to upload it to a central gallery so it becomes available to other users when they create a new list. The following steps detail how to upload an existing list template to a new location.

  1. From the resource materials website, download the file clients.stp.

  2. From the top level of your site collection, select Site Actions image from book Site Settings (the menu path was previously shown in Figure 4-14). The Site Settings window appears as shown in Figure 4-29.

    image from book
    Figure 4-29

  3. From the Galleries category, select the Site Templates link.

  4. Click the Upload button from the toolbar.

  5. Browse to the location where you saved the clients.stp file.

  6. Click OK to upload the template.

How It Works

Once uploaded to the gallery, the template can be used by other users as a starting point for a new list. This same process applies to custom document library templates. You will review a very similar process for managing site templates in Chapter 8.

image from book

Managing Version Control

Items in SharePoint can be versioned. This means that as you modify either list items or documents, SharePoint saves iterations as specific versions. This allows users to revisit a previous version of an item or even track how something changes over time. To make this functionality available, you must enable versioning on the list or library.

Certain customization options are unique to a document library environment and do not apply exactly the same to a list. When you enable the document version history creation on the library, you have the following choices for how to store the versions:

  • Major version:   This is considered the same as a published version of a document. Over the life of a key organizational document, a site admin is more concerned with a previous major version of a document rather than the minor versions that show specific iterations of the document’s creation or modification. You can limit the number of major versions that are retained. This is useful particularly for libraries where documents are fairly large in size and change very seldom.

  • Minor version:   This is an iteration of the document while in draft mode. This is helpful for scenarios where many people must work on a document before it publishes to the entire organization. Each time a user works on the document and saves it, SharePoint creates a new minor version. However for long-term editing purposes, the minor version is not as relevant.

  • Check in and check out:   Instead of making this feature optional for users, you can require that all documents be checked out before users can edit them. This provides a greater level of control in the editing process.

You can enable versions on lists as well as document libraries. However in a list, there is no concept of major and minor versions. Nor can a user limit the number of versions of a document that are stored.

The next Try It Out shows you how to enable document versioning.

Try It Out-Enable Document Versioning

image from book

In this example, you set options so that a maximum of 10 major versions are saved and stored in your library. Once more than 10 versions are created, the older versions are no longer kept. To enable version control on a document library, follow these steps:

  1. From the main page of your site, select View All Site Content from the Quick Launch navigation bar. The All Site Content window appears, as shown in Figure 4-30.

    image from book
    Figure 4-30

  2. Select the library for which you want to enable versioning by clicking the hyperlink for its name.

  3. Select Settings image from book Document Library Settings from the toolbar menu.

  4. Select Versioning Settings from the General Settings category. The Document Library Versioning Settings window appears, as shown in Figure 4-31.

    image from book
    Figure 4-31

  5. Select the Create Major and Minor (Draft) Versions option from the Document Version History section.

  6. Select the Keep the Following Number of Major Versions check box and enter 10 into the text box.

  7. From the Require Check Out options, select Yes.

  8. Click OK.

image from book

Managing Document Templates

When you create a document library, you are asked to select the document template that will be associated with the library by default. This association does not affect what type of documents you can store in a library, but instead determines the type of file that gets created when a user selects the New button from the Document Library toolbar. The choice of templates to select from includes:

  • Word 1997–2003 Document

  • Excel 1997–2003 Spreadsheet

  • PowerPoint 1997–2003 Presentation

  • Word Document

  • Excel Spreadsheet

  • PowerPoint Presentation

  • OneNote Section

  • SharePoint Designer Web Page

  • Basic Page

  • Web Part Page

When you customize a SharePoint site, the goal is to implement elements that encourage reuse and standardization. If you want to use a document library to store sales presentations, it’s a good idea to associate the standard organizational template for sales presentations with the library so that the New button generates a blank presentation that users can then customize and use for their own purposes.

In cases where you have a document, such as a Word file containing your company’s logo or letterhead, and you would want to use that as the default document template. Another common example is an Excel spreadsheet containing the fields and calculations needed for a report that users often create when in the document library.

You have three ways to associate a document template with a document library:

  • Edit the template directly and save the changes.   This is most appropriate where an existing template already exists. However it’s not practical if you already have a standard organizational template available.

  • Upload the template to a specific location and change the URL.   In this case, you change the URL for the document library template to point to the new location. This is appropriate if you have a single location with multiple templates already, or you may want to have the document template associated with more than one document library. This method is explored in the next Try It Out.

  • Give your template the file name of template.doc and upload it to the Forms folder of the document library.   When you do this, you are prompted to overwrite the existing template, as shown in Figure 4-32. This is best for situations where you have an existing template but you only want to associate it with a single document library.

    image from book
    Figure 4-32

Try It Out-Associate a Custom Document Template with a Library by Changing the URL

image from book

For this example, you upload your template to a specific location and change the URL to point to a new location.

  1. From the main page of your site, select View All Site Content from the Quick Launch navigation bar.

  2. Select the library for which you want to enable versioning by clicking the hyperlink for its name.

  3. Select Settings image from book Document Library Settings. The Customize Shared Documents window appears, as shown in Figure 4-33.

    image from book
    Figure 4-33

  4. Under General Settings, select the Advanced Settings link. The Document Library Advanced Settings window appears as shown in Figure 4-34.

    image from book
    Figure 4-34

  5. Under the Document Template section, you can select one of two options:

    • Select the URL to the location of the new document template. This is useful if you have a central library of templates located on the site.

    • Select the Edit Template hyperlink. This opens the existing template so that you can customize it by adding all the necessary elements.

  1. Save your changes to the document, and close it when you finish.

  2. Click OK to complete the operation.

image from book




Beginning SharePoint 2007. Building Team Solutions with MOSS 2007
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 (Programmer to Programmer)
ISBN: 0470124490
EAN: 2147483647
Year: 2007
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net