Export (0) Print
Expand All

Chapter 3: The SharePoint User Experience (Part 1 of 2) (Professional SharePoint 2007 Development)

SharePoint 2007

This article is an excerpt from Professional SharePoint 2007 Development , by John Holliday, John Alexander, Jeff Julian, Eli Robillard, Brendon Schwartz, Matt Ranlett, J. Dan Attis, Adam Buenz, and Tom Rizzo (Chapter 3 written by Brendon Schwartz), from Wrox (ISBN 978-0-470-11756-9, copyright Wrox 2007, all rights reserved). No part of these chapters may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, electrostatic, mechanical, photocopying, recording, or otherwise—without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews.

Next Part: Chapter 3: The SharePoint User Experience (Part 2 of 2) (Professional SharePoint 2007 Development)

By Brendon Schwartz

Windows SharePoint Services v3 (WSS) provides tremendous functionality right out of the box. When many developers and end users think about performing custom development, they tend to think about having to write code. Because Windows SharePoint Services is a framework, and Microsoft has already written a user interface layer, you can make many development changes without writing any code. This chapter looks at some of the basic functionality that is provided when you install WSS v3. Keep in mind that you will also have this functionality in Office SharePoint Server 2007 because Office SharePoint Server simply builds more functionality on top of the core functionality provided by WSS v3.

WSSv3 provides enhanced lists and libraries that you can use to create a fully functional site. The improvements made to lists give you more control over the performance of the list. For example, lists now contain easier ways to stay connected with users, such as the new RSS feature, but lists still offer you the ability to notify users with email. Lists are useful, but what really makes them powerful is the ability to add metadata that describes the columns included in a list. I start the discussion by looking at a basic list, created by using Site Columns. After that, I discuss Content Types and how you can use them to create more flexible and useful lists with a lot of distinct data in them.

In previous versions of SharePoint, it was difficult to change the overall appearance of a site and to support variations in the site navigation user interface (UI). Now the 2007 version greatly simplifies these tasks by using master pages and site navigation controls borrowed from ASP.NET 2.0, which is the foundation of Microsoft Office SharePoint Server 2007. A master page can provide a common look and feel for all pages in the site, and changes you make to the master page automatically propagate to all dependent pages. Site navigation controls make it easy to display only the links that are relevant to the user.

Finally, this chapter talks about how SharePoint 2007 takes advantage of many other ASP.NET 2.0 features. For instance, SharePoint sites are now compatible with a broad range of browsers and can even be configured for use from mobile devices. In addition, web developers will be happy to learn that SharePoint no longer contains its own page rendering engine but rather uses the one built into ASP.NET. This means that you can build ASP.NET web pages and blend them into a SharePoint site without a lot of rework. In this chapter you take a look at:

  • The standard features of Windows SharePoint Services v3, including lists and document libraries

  • The columns of lists, including the Site Columns and Content Types

  • Enhancements to the user interface and how to modify the site look and feel

  • The addition of Mobile Development to Windows SharePoint Services v3

Contents

Site Design Starts with Web Applications

Every site has a web application at its core. The web application is the central location for many of the features of SharePoint and is physically located on a web server using Internet Information Server (IIS). Creating a web application also allows for some key decisions about the application such as the definition of an authentication method. It is here that you will be deciding on the content database for SharePoint. To begin making a site in Microsoft Windows SharePoint Services 3.0, you start by creating a web application that creates a new content database: When creating a new application for the SharePoint 2007, a site designer will need to decide on the type of authentication method for that site. In addition, each web application will use a database to store the data from the site.

Ff604040.Tip(en-us,office.12).gifTip:

Web application is the new name for what was known as a "Virtual Server" in Windows SharePoint Server v2. The term Virtual Server confused new developers and end users because Microsoft also has a product known as Microsoft Virtual Server. To help resolve the confusion, the SharePoint team now calls the sites that are created in IIS, web applications.

  1. Navigate to the Central Administration page, click the Application Management tab.

  2. Under SharePoint Web Application Management, click the Create or Extend Web Application. This is where you can decide if you want to use an existing site already created in IIS or if you want to create a new web site.

  3. To create a new web application click on Create New Web Application.

    Ff604040.Tip(en-us,office.12).gifTip:

    Keep in mind that you must have permission to create a new web application in IIS. This will also set up the authentication of the application in IIS also.

  4. The next page shows the settings for the web application being created. On the left side of the page are descriptions of the settings. On the right side of the page is where the settings can either be accepted as the defaults or changed to be custom values. See Figure 3-1. When you are done, click on OK. SharePoint will then create the new web application.

Figure 3-1. Web application settings

Web application settings

Content Is Stored in a Site Collection

Even though a web site has been created, a site collection needs to be added to have a place to store the content of the site. The site collection is a top-level site that will contain all of the other pages in the site. It is the parent to all the child sites that can be created. Once the site collection has been created, the site can be viewed. When a new SharePoint web application is created, a site collection is not automatically created by SharePoint. Therefore, when you are finished creating a new web application, SharePoint will prompt you to create a site collection. To create a site collection navigate to the Application Created page, click on the Create Site Collection link.

Ff604040.Tip(en-us,office.12).gifTip:

Another way to access the site collections page is from the Application Management tab, under SharePoint Site Management by clicking on Create Site Collection.

The Create Site Collection page allows the first customization of the site you are creating. It is here that a title, description, and URL can be provided (see Figure 3-2). A template needs to be selected, depending on the needs of the site. A primary and secondary site collection administrator can be named here, as well as a predefined quota template, used to limit resources used for this site collection. After filling in all of the information, click OK and the top-level site will be created!

Figure 3-2. Site Collection page

Site Collection page

SharePoint provides a link to the URL so that the site can be opened in a new browser, while providing an OK button that will return you to SharePoint Central Administration. At this point, the rest of the changes will be done in the site collection, so follow the URL to the new site, instead of going back to the Central Administration page. The SharePoint site has been set up and is now ready for customization. Figure 3-3 shows a simple team site that has been selected as the template for the site collection.

Figure 3-3. SharePoint List

SharePoint list

Using SharePoint Lists and Libraries

SharePoint is made up of content and data. The content in SharePoint is the user interface and information stored in Web Parts, while the data is information that SharePoint stores in the database and can be versioned. The lists and libraries of SharePoint are the core to store data in SharePoint. Lists and libraries are web pages in Windows Services SharePoint 2007 where information can be stored and organized. Many types are available and are covered in the following sections. A list is simply that—a set of data that lists information that is helpful to the users. The lists can be set up and customized by a site designer or authorized user to contain any number of fields required for list data. A library is where a collection of files, as well as associated data, can be stored and managed. SharePoint makes it very easy to store and manage information in a way that is most useful to the end user. Every list is defined in a file called Onet.xml that is stored in the site definition. Following is a table that describes some of the standard lists you will find in some of the Onet.xml file, as well as the number that represents the list internally. This value is used in many of the configuration files to reference the list as well as when programming with lists. Keep in mind you might not have all list types for every site.

Table 1. Standard SharePoint lists

Value Available on Default Team Site Description

100

Yes

Generic list

101

Yes

Document library

102

Yes

Survey

103

Yes

Links list

104

Yes

Announcements list

105

Yes

Contacts list

106

Yes

Events list (Calendar)

107

Yes

Tasks list

108

Yes

Discussion board

109

Yes

Picture library

110

No

Data sources

111

No

Site template gallery

113

No

Web Part gallery

114

No

List template gallery

115

Yes

XML Form library

119

Yes

Wiki Page library

120

Yes

Custom grid for a list

150

Yes

Project Tasks

200

No

Meeting Series list

201

No

Meeting Agenda list

202

No

Meeting Attendees list

204

No

Meeting Decisions list

207

No

Meeting Objectives list

210

No

Meeting text box

211

No

Meeting Things to Bring list

212

No

Meeting Workspace Pages list

300

No

Portal Sites list

1100

Yes

Issue tracking

2002

No

Personal document library

2003

No

Private document library

Using Pages to Display Lists

To provide end users with a way to get to lists SharePoint allows you to create pages to display information. A SharePoint site allows you as the site designer to organize and store the lists and documents you create all in one place. To start with, you need to have a page that allows you to add the content and lists. To create such a page, click Site Actions on the Site Settings page, then select Create. The Create page is where you can select any type of content to add to a SharePoint site. These items are managed by categories that can be created, including: lists, document libraries, discussion boards, surveys, and pages. Once the page is created, you can then place any number of lists or content items on the page. The following table shows each type of page that you can create with in SharePoint 2007.

Table 2. Types of pages

Name Description

Basic Page

Creates a simple web page that can be modified by using a web browser to add text, pictures, and tables. This is a simple page that can be created if you are unsure of what you need, and it can be modified later as needs arise.

Web Part Page

Can be used to create a page that will be used to share many different items. A Web Part page can show many different Web Parts on the same page. Each Web Part can be used to show various items, including lists, libraries, links, and other types of information. This type of page is very versatile and can be used when many different types of lists need to be shown on one page.

Sites and Workspaces

An entirely new site or workspace can be created to serve as a new place for collaboration, communication, or content storage. Sites can be created in order to hold all of the lists and libraries that are created and used. A new site can be created for all the different teams that might need one, or all the different uses that may be needed for one team. Each site serves as a place where the team can come together and share information and work together on different things. A work team can create their own site, or a company division may have a site of their own.

Storing Data with Lists and Libraries

Data that is stored in SharePoint is stored in one of two ways:

  • Lists—These contain data elements that define what data is contained in SharePoint. Some common examples are a list of links, a list of announcements, or a list of custom data elements.

  • Libraries—Libraries are a special type of list that has built-in capabilities to handle storing files. This includes version and new file template features.

Site designers will use either libraries or lists to store the data. Even though a library is a specialized type of list, it is discussed separately because it has features that set it apart from a standard list.

Adding Lists to the Site

You can customize lists as needed, but there are a number of prebuilt lists that SharePoint provides to help you create sites quickly. When one of these items is created, it can be placed on your top-level site and accessed by many users. The built-in lists are described in the following table.

Each predefined list is shown to the user in the user interface in different categories. The first set of lists is the types of lists that are used in the communications category to communicate with other users in a SharePoint site. Each communication list is in the following table.

Table 3. Communication lists

Name Description

Announcements

A list that can be used to share short bits of information, such as announcements, news, status updates, and the like. This is a good page to use as a company’s intranet home page to keep employees up to date with any changes or news about the company that needs to be shared.

Contacts

Can be used as an online address book. This list makes it easy to manage information about all of your different contacts, such as customers, partners, and employees. Information can be shared between this list and other WSS-compatible contacts programs. Contacts are very important in any type of business, so a central storage area of contacts can be very powerful to help in day-to-day business. Sales forces, in particular, would also rely heavily on contacts pages that could store information about the customer, such as personal information, order history, and any other information that could be helpful in making the sale.

Discussion Board

Used as a place for people to read and post in a discussion-style format. A discussion board also provides features to help manage the discussion threads and to control the content, such as restricting posts from unauthorized people. This could be used as a central area to have brainstorming sessions, especially if there are people all over the world who can’t meet because of geography or time schedules.

In addition to the lists in the Communications category, you can also use the tracking lists described in the following table.

Table 4. Tracking lists

Name Description

Links

Lists URL links to web pages and other resources that need to be kept on hand and shared among people. This is good both for keeping commonly used links all in one place and for rarely used links, so they are kept in one central place and not lost.

Calendar

Used to view upcoming events in a calendar-based list. A company team can share a calendar to keep track of deadlines, meetings, rollouts, and the like. Also, information can be shared between the calendar list and a WSS-compatible events program.

Tasks

Keeps track of the assignment and completion of tasks that need to be done. All people on a team can see how the project is coming along and what tasks still need to be completed to make deadlines.

Project Tasks

Similar to the tasks list, the project tasks list provides a graphical view in the form of a Gantt chart. A group of work items that need to be done can be tracked by the entire team on the project. This list can also be opened in WSS-compatible programs.

Issue Tracking

Can be used to manage issues by assigning them to a person or team, creating a priority order, and tracking the progress of the issue. An issue-tracking list is ideal for a customer service department that is responsible for dealing with customer issues and making sure that they are followed through to resolution.

Survey

Helpful when trying to poll, or survey, a group of people on certain issues. You can create questions for users, and create the answers that they must choose from. This is a great tool to get feedback from customers that use your site, and since they simply choose from prewritten answers, the time it takes them to complete the survey can be kept to a minimum.

Sites and Workspaces

An entirely new site or workspace can be created to serve as a new place for collaboration, communication, or content storage. Sites can be created in order to hold all of the lists and libraries that are created and used. A new site can be created for all the different teams that might need one, or all the different uses that may be needed for one team. Each site serves as a place where the team can come together and share information and work together on different things. A work team can create their own site, or a company division may have a site of their own.

Creating a Standard Link List

A common list that many sites have created is the link list, which can be used to share web pages’ links with other users of the site. To create the link list, follow these steps:

  1. Click Site Settings and then Create.

  2. On the Create page, click on Links under the Tracking heading. All lists have a name and description field you can fill out.

  3. The only required field is the name field, but a description will help your users know what the list is about. Enter a name and description for the links list; you can use information like "Real Estate Links," and the description will be "Web sites for real estate services." The option to display the list in the Quick Launch bar is set to Yes by default. This will display the new list on the Quick Launch bar, which is the default setting for Navigation.

  4. Click on the Create button, and the Real Estate Links page is displayed as shown in Figure 3-4.

Notice that the new Real Estate Links list page is shown under Lists on the Quick Launch bar. However, the new list does not exist on the other sites that have been created such as child sites. When a new list is created, a default page is created that displays the list that was just produced. In this example, the page that is created manages the links and has a default view of the links. This list can be added to one of the content pages with a set view of the data.

Figure 3-4. Real Estate Links

Real estate links

Managing Lists

Lists are one of the central concepts of SharePoint and how data is stored within SharePoint. Most lists are updated with data on a regular basis and are not static. Some common actions that you can perform on lists are adding items, removing items, and modifying the list settings. These actions can be performed either through the web user interface, through the object model, or through web services. In the following sections, you learn how to use the user interface to perform such tasks and more.

Adding Items to Lists

To add items to lists, you must have the correct permissions or you will not be able to access the create list item pages. Here are the steps required to add a link to the new list you just created:

  1. Click on New at the top left of the page. Each list will have a different set of fields to enter for the data. The links list has a URL and description that are required fields and a notes field, which is not required.

  2. Type the URL for the new link in the first space, and then add a description.

  3. Click OK, and the link will be shown at the top of the link list page. The description is shown under URL to let users know what the link is, and the notes are shown. If the description is clicked, it takes the user to the web site. Each list can be used in the same way but will require different fields. You will find the correct use of each list as the functionality is required on the site.

Ff604040.Tip(en-us,office.12).gifTip:

The links page is ideal for links that are used often, so they are ready at hand. Alternatively, it is great for links that are not used very often, so they can always be found in one centralized place.

At the top of the links section of the page, there are a couple of buttons that should be discussed. These buttons are labeled New, Actions, and Settings. Each set of buttons provides functionality that allows the user to manage, display, and update the list.

The New button can create a new item or a new folder. The lists have folders turned on by default to allow users to store data in the familiar folder structure.

Taking Action on the List Items

The Actions menu provides the ability to work with the items in lists as data exporting data, and setting up interaction with the list. In addition, the Actions menu allows users to export the data to other tools such as Microsoft Access and Microsoft Excel. This allows end users to use the most common tools they use every day to work with the list items. Finally, users can use the Actions menu to provide notifications about events that happen on a list such as adding new items.

Changing List Settings

The Settings button displays a menu that enables you to create a column, create a view, or manage list settings. Each different list or document library page will have buttons similar to these, which allow the user to customize the list as needed. The customization of the data and information is one of the strengths of SharePoint that makes it so powerful and useful for both the developer and the end users.

Creating Custom Lists

When none of the lists that are provided by SharePoint meets your needs, a custom list can be created. To create a custom list, you must specify the columns that are needed, and then a web page is created that allows for adding or editing each of the items.

To create a custom list, follow these steps:

  1. Click the Create link from Site Actions.

  2. Select Custom List, and then give the new list a name and a description.

  3. Click on Create and the new list is created. Once the new list is created, you will need to add your own columns to the list. I talk about columns shortly.

Adding items to a custom list is the same as with any other list type. The column fields that will need to be filled out depend on what columns have been added to the custom list. The only field that the list item needs by default is the Title field. To add items to the list, click on New and then type the title for the item, and click OK. A list can be created for any need that cannot be met by using any of the existing lists.

Creating Custom Lists in Datasheet View

When a custom list is needed, and the best format for the list would be a spreadsheet, you can create a custom list in datasheet view. When created, this list opens in a spreadsheet-like environment so that the user can easily add, edit, and format data. This makes it easy to work on lists that have a lot of data that needs to be organized in a format that can support using a lot of columns and rows. Columns and items can be added in the same way as when using a custom list. However, it is important to remember that a custom list in datasheet view does require a WSS-compatible list datasheet control and ActiveX control support.

Importing Data from Spreadsheets

A new list can be created by using an existing list that has the same columns and contents as you would like to have in the new one. However, to import a spreadsheet, you must have a WSS-compatible spreadsheet application. When importing the spreadsheet, simply type the name and description, and then browse to select the file location of the spreadsheet you would like to import. Once the imported spreadsheet is created, it can be modified in the same way as custom lists.

Adding Document Libraries to Sites

A document library is created in much the same way as a list. Just as with lists there are document libraries that you can create from the Create page. Each one of the libraries can hold specific types of files and is designed to help provide the necessary document management functions of SharePoint. These libraries are discussed in the following table.

Table 5. Document libraries

Name Description

Document Library

Used when there are many documents that need to be shared among many people. Various actions can be done with document libraries such as using folders, having different versions (versioning), and using the file checkout feature. This can be very helpful when there are many developers working on different parts of a web site, all using various documents that contain code.

Form Library

Can be used to store XML-based documents. An XML editor is required to use a form library, such as Microsoft Office InfoPath. However, this library is very useful to manage business forms that are based on XML.

Wiki Page Library

Can store an interconnected collection of Wiki pages, and it is also able to support storing pictures, tables, Wiki linking, and hyperlinks. This opens the library up to many different uses because it supports such a large variety of media. Wiki pages are commonly used to share authoritative information on many different subjects.

Picture Library

Used for storing and sharing pictures. The picture library makes it easy to manage and display pictures by offering features such as thumbnail photos, different options for downloading, and the use of a slide show. An auto insurance company could use a picture library for accident claims. Picture libraries are also very popular for personal use as well as the different business uses that could arise.

Creating a Standard Document Library

One common type of list is a document library. A document library contains a column type of file where you can store documents. Once you create a document library you can then have the system display the documents it contains on other pages as well as perform searches within the documents.

  1. From the top-level page, click on the Site Actions tab, and select Create.

  2. Choose the Document Library link under Libraries. Type in a name and description for the document library on the New page.

    Ff604040.note(en-us,office.12).gifNote:

    Because a document library is just a type of list, the same structure as in other lists, such as name and description, will be found in libraries.

For example, you could type in Standard Offers with a description of Standard Offers for types of listings. To display the document library on the Quick Launch bar, leave the Navigation button on Yes. To enable versioning on a document, you can select the option to have a version kept for each document that you check in. The Document Version History button will determine if the version history is kept or not. The versioning of documents can be very helpful when trying to keep track of changes in documents.

Ff604040.Tip(en-us,office.12).gifTip:

Every time a new version is created, the database size will grow. Make sure to store the version only if it is required for a document library.

Finally, a document template can be selected for the library. The document template will be the default file type for all new files that are created in this document library. For this particular example, choose Microsoft Office Word 97-2003 document, as shown in Figure 3-5. Click Create, and the document library is created.

Figure 3-5. Standard Document Library

Standard document library

Once the library is created, end users can create a new file or they can upload the file. Because Microsoft Office is fully integrated with SharePoint, the document opens directly in the application selected as the file type.

Deleting a List or Document Library

Lists are stored in the database, and they are not always shown in the Quick Launch bar. To see all the lists that are available on the site, simply click the View All Site Content on the Quick Launch bar, and you will see all of the lists that have been created on the site. You will notice that they are again displayed in categories to make them easy to find. To completely delete a list or a document library, navigate to the page you want to delete, then follow these steps:

  1. Click on the Setting button on the top-left menu of the list or library page, and select List Settings or Document Library Settings, depending on what you are deleting.

  2. The middle heading, Permissions and Management, has a top link, labeled Delete this list or Delete this document library. Once you click on the link, a message pops up to make you confirm your selection.

  3. The list or library that you have chosen to delete will be removed, and all of the files associated with it will be deleted. Confirm that you are sure you want to delete the list or library by clicking on OK. SharePoint will then go to the All Site Content page, which shows all of the existing pages for the site.

Using the Recycle Bin

One of the biggest problems in previous versions of SharePoint was not being able to restore documents or items that end users accidentally deleted. SharePoint 2007 now has the ability to easily restore these items from a two-stage recycle bin. On the Quick Launch bar, the bottom link is for the Recycle Bin. Whenever a list or library is deleted, it is removed from the site and stored in the site’s Recycle Bin. An item’s document type, name, original location, created by, deleted date, and size are all shown on this page. These items can be restored to the site, or they can be "emptied," which would delete the items, sending them to the site collection administrator’s recycle bin. It is important to note that after 30 days, a deleted item will automatically be emptied from the Recycle Bin. Items that have been deleted from the entire site collection can be managed from the Site Collection Recycle Bin, for which a link is provided.

Customizing List Columns

Customizing columns in a list is quick way to add more meaning and value to the data you store in SharePoint. To customize a list, follow these steps:

  1. Click the Quick Launch link for a list, such as the Real Estate Links page created earlier. The default columns are shown, which include Type, Edit, URL, and Notes for a links list. Perhaps a new column is needed, to show who added the link.

  2. On the page menu, click Settings, and then Create Column. The Create Column page is shown. Here, you specify settings for the new column. The name of the column is what the end users will see.

  3. Set the value to Added By, and then select the single line of text. Make sure to always add a meaningful description for the users who will navigate through the site.

  4. Add the description Agent that added the link.

  5. You have the option at this point to require information to be added to the column or not. For this case, information will be required, so change the button to Yes. In addition to the settings for all columns, there are type-specific settings that appear once you select a list type—for instance, the maximum number of characters and the default value. In this case, limit the number of characters to 25 and don’t set a default value to limit space used for this list.

  6. Click on OK, and the Real Estate Links page is shown, but now there is a new column that is shown on the right—the Added By column.

Adding Items with Custom Columns

Now, whenever a new link is created, there is a new column that must be filled out. Click on the New button at the top of the page. The New Item page is shown, with the items that can be filled out. The URL information section is required, which is shown by the red asterisk that is next to URL. The Notes section does not require any information. The new Added By column is shown next, with an asterisk next to it. This information must now be included anytime a new link is added.

Modifying Items with Custom Columns

Any previous links that were added before this column was added won’t include your new information. Therefore, if you edit an existing link, you must add the new information before changes can be saved. If you edit the item, but don’t add information for the newly required column, SharePoint doesn’t save it, and displays a message box requesting that a value be specified for the required field.

Setting Permissions

Permissions can also be set for a list from the list page. Keeping with the previous example, hover the mouse over the URL in the list, and an arrow appears on the right for a drop-down menu. Click the arrow, and the menu appears, with options that include View Item, Edit Item, Manage Permissions, Delete Item, and Alert Me. Click Manage Permissions, and the permission for this particular list item (the link) are shown. Three types of users/groups are set by default: Members, Owners, and Visitors. The Owners of the group are allowed full control. Members of the group, or member users, are allowed to contribute to the site. Visitors, however, are only allowed to read information on the site; they are not allowed to change anything. These permissions are inherited from the parent folder or list.

There is only one button on this page, which is the Actions menu button. This button allows you to manage the permissions of the parent or to edit permissions. If you choose Manage Permissions of Parent, the Permissions page for the entire site is pulled up. Changes you make to these permissions are then passed down to the list being edited, through inheritance. Here, you can create new users/groups and set their permissions, as well as edit or remove the current users/groups’ permissions. However, if you choose Edit Permissions from the list on the Permissions page, the original permissions are copied from the parent and then changed. Once these changes are made, the list will stop inheriting changes from the parent. This ensures that any changes you make aren’t overwritten by changes made to the parent permissions.

Understanding SharePoint List Views

The way each site is viewed can be changed to allow for optimal viewing by users, depending on their individual needs. SharePoint allows for the creation of different types of views, among which users can choose according to their needs. Views allow users to see the items on a list sorted in a particular order or by the most current modified date or by any other view that may be needed. Views can also be created that allow users to see only certain items of a whole list, depending on matching criteria and how the view was set up. Once a view is created, it is always there for users to choose as their current view. Each type of list may come with a predefined set of views. Some of the most common lists are shown in the table below with the default views.

Table 6. List views

List Type View Name

Document Library

All Documents (Default View)

Explorer View

Calendar

Calendar (Default View)

All Events

Current Events

Task

All Tasks (Default View)

My Tasks

Due Today

Active Tasks

By Assigned To

By My Groups

Managing Existing Views

Each site is created with a default view. From the list or library page, click on the Settings button, and select List Settings. This brings up the Customize page for the site. This page has all of the list information, along with ways to manage the general settings, permissions, communications, columns, and views. At the bottom of the page is the section that shows the different views. There should be a list of the views that are available for this list. The default view is All Links, which shows all of the links, sorted in the order they were created.

Creating a New View

A new view can be created from the Customization page, as follows:

  1. Click Create View at the bottom of the page. Alternatively, click the Settings button on the list page, and then click Create View. A new view can be created to select columns, filters, and other display settings that would be more helpful and productive to the users.

  2. The Create View page comes up. Click Choose a view format in the first section to create an entirely new view. Or, choose Start from an existing view to begin building your view from one that already exists.

Using the Start from an existing view section to create a new view can be helpful when creating a view that has many of the same settings as a view that has already been created but is slightly different. The existing view can be chosen, and then slightly modified and saved as an entirely different and new view.

Choosing a View Format

To create a completely new view, select one of the views under Choose a view format. You can choose from the following views as your starting point:

  • Standard View—Shows data on a basic web page that can be customized.

  • Calendar View—Shows information in a daily, weekly, or monthly calendar format.

  • Datasheet View—Gives the ability to view the data in a spreadsheet that can be edited. This allows for easy editing of large amounts of data and also for quick and easy customizing.

  • Gantt View—Is a visual representation of the data in a graph view. It is used to show how a team’s tasks relate over time.

A standard view is the most common type of view and should work well in most cases. Choose a view name that is intuitive and descriptive, so that when users are choosing a view they know what this one will show. An example of a name to use for a links list is "Sort by URL" because that list will sort the links by the URL description.

Selecting the Audience for the View

When creating your views, there are two options for the type of audience that the view can be created for:

  • Personal View—Allows the view to be viewed only by the owner of the site.

  • Public View—Can be used by anyone using the site.

This audience will come in handy when you need to have a specific view for just yourself but don’t need to create the view for everyone else to see, such as a list task for one user.

Choosing Columns to Display

In the Columns section, you determine which columns to include in a view. If a column is not checked, the information isn’t shown. If the column is checked, the information is displayed. To the right of all of the columns, are drop-down boxes where you can set the order in which the columns should be displayed. All of the columns that have been created for this list appear as valid selection items, but you may not want to show all of the items in the view.

Sorting and Filtering Items in a View

Organizing the data is the primary use of views. To accomplish this, the sorting and filtering of the data is used to create a very specific list for the end users. Sorting is a good way to provide a detailed list of information with the most important items at the top of the list. This option allows columns to be sorted alphabetically or numerically, depending on the type of information in the column. When you are building the view, you can sort the items by the column, either in ascending or descending order. The items can be sorted by one or two columns.

Filters allow the view to show only certain items that meet the set criteria. The option of not using a filter is available, and in that case all items in the view will be shown to the user. If the view does require filtering, you can enter criteria that allow only certain items to be shown. For instance, the view can be set to only contain items that have been created by a certain user. The number of filters can be extended by clicking the Show More Columns link. The filters allow you to compare the data or use the And/Or operators with each filter. Each filter can use a column field and compare it to a set of data using predefined operators:

  • Is equal to

  • Is not equal to

  • Is greater than

  • Is less than

  • Is greater than or equal to

  • Is less than or equal to

  • Begins with

  • Contains

Other options can be set for the new view being created. Columns can be displayed in groups, columns can be totaled, and the style of the view can be changed. The view can be set up so that users have to navigate through folders to view items or so that they can view all of the items at one time. The number of items returned can be limited, and the view can be made a mobile view, as well. When all of the settings have been selected, click on OK and the view is created.

Choosing a View

Now that there are multiple views to choose from, your users can select a view other than the default view. From the list or library page, there is a drop-down menu at the top right of the page labeled View. Click on the arrow on the right, and the different options that can be chosen are shown. The view can be set to All Links or any of the other views that have been created. Options in this All Links drop-down menu enable you to modify a view or create a new view.

Adding and Removing Lists and Libraries

The functionality and the look of a site can be changed by moving the Web Parts around for optimal placement. From the main page, you can modify the home page to contain any of the lists or libraries that you have created:

  1. Click on the top-right tab, labeled Site Actions, and select Edit Page. This allows you to add, remove, or update Web Parts on the page. When clicked, the page comes up in Edit Mode, allowing easy manipulation of the Web Parts.

  2. At the center of the top of the page is a link labeled Add a Web Part. Click it to open a window that allows for the addition of any or all of the types of Web Parts that are available. Notice that any new lists or libraries that have been created are also available in this selection.

  3. Select what to add, such as a links Web Part, and click Add at the bottom of the screen. At the top the page shows the Links Web Part that was just added. Now, the different sections of the page can be used to sort various types of links.

Deleting a list or library is similar to adding one:

  1. Under the Site Actions menu, select Edit Page. The page will be switched to the Edit Mode, where the different Web Parts can be managed separately.

  2. At the top right of each Web Part, there is an Edit menu with a small arrow. Simply click the Edit menu and select Delete from the menu options.

List Notifications

SharePoint has the ability to send notifications when certain events happen. By default, SharePoint exposes the change type and alert changes events. The change type can be all changes as well as just adding, editing, or deleting items, whereas the alert changes can be any change as well as someone else changing documents, depending on whether you choose "filter by me" or not. These notifications can occur in two different ways: RSS feeds, and email alerts. The user subscribes to an RSS feed, and the information is pushed out whenever new information is added. An email alert, on the other hand, is triggered by an event and is sent out when the event occurs.

RSS Feeds

RSS feeds allow for new information to be pulled to users when they request it.

  1. Navigate to the list from which you would like to provide an RSS feed, and simply click Actions.

  2. Select View RSS Feed. A page will come up confirming that you would like to subscribe to this RSS feed.

  3. Click on the link that says Subscribe to this feed. A message box pops up so that the RSS feed can be named whatever you want, and it allows you to save the feed in the proper place.

  4. Click on Subscribe, and a confirmation page will be shown.

Whenever information is updated on the site, the information will be pulled down to your computer when the RSS application makes a request.

Ff604040.Tip(en-us,office.12).gifTip:

To receive notifications through an RSS feed, the user must have an RSS reader set up and must subscribe to the feed. Internet Explorer 7 and Outlook 2007 both include RSS readers.

Alerts

Another way of being notified when information is changed is to set up an alert. Alerts notify the user via email whenever changes are made to the list.

  1. From the list page, click on Actions and select Alert Me.

  2. The New Alert page comes up, where the alert settings can be selected.

  3. Enter an alert title you want to use in the email, which will be included in the subject of the notification email that is sent.

  4. Next, names or email addresses must be entered to show where the alerts should be sent.

  5. Select the type of changes that you want to be alerted to, along with setting filters for specific criteria that should be met for an alert to be sent.

  6. Finally, you can also choose the frequency of the alerts—either an immediate email when changes are made, a daily summary email, or a weekly summary. If you choose a daily or weekly summary alert, the exact day and time of the email can be set from this page as well.

  7. Click on OK when all settings are made, and the alert is set.

Content Management Improvements

Lists and libraries are the primary data sources and storage locations for SharePoint sites. Because of this, there have been some enhancements to lists that allow for better collaboration and better management of documents. These new features are completely integrated with Microsoft Office 2007 and allow users to perform the actions from within the Office application of their choice.

Customizing the Home Page

SharePoint makes it easy to customize a site:

  1. From the top-level site, click on the Site Actions tab located on the right. Select Site Settings, and you will see five menus across the top of the page, with options listed below them.

  2. Under Look and Feel, click on Title, description, and icon.

  3. On the page that comes up, there are places to change the title and description, and to insert an image as a logo or icon for the pages. Also under Look and Feel is a link to change the site’s theme. SharePoint provides many different-colored themes to personalize the site. These are simply ways to change the look and feel of the site without having to spend a lot of time on the process. End users will quickly know what site they are on and will notice that all of the pages do not look the same.

Site Navigation

Navigating through a SharePoint site is very intuitive. The menu on the left of the screen can be used to visit different pages that are added, including lists, calendars, and so on. This menu is called the Quick Launch bar. Alternatively, the main team site itself can be used as a portal for access to all the different pages by using Web Parts. Also, under the Look and Feel menu options on the Site Settings page, the view for the site can be changed to a tree view, allowing for the site’s content to be shown in a physical representation. This changes the Quick Launch bar on the top-level site by also showing a site hierarchy, which may be more helpful for some users. Figure 3.6 shows the tree view of menu options once it has been enabled under Site Hierarchy.

Figure 3-6. Tree view of menu options

Treeview of menu options

Versioning

Many users have data that is constantly changing and need a way to keep track of these changes. SharePoint provides this ability through the use of versioning. Versioning is when a copy of the old data is kept in storage while the new data is shown in a list. With SharePoint 2007, you have the ability to maintain a number of versions of data as well as restore and compare different versions of that data.

The ability to use versioning has been added to all lists. This is a great improvement over the previous version of SharePoint, which only allowed versioning on document libraries. In addition to having versions for all lists, the ability to add content approval for items has also been added as a feature. This allows for draft items to be created and also to be stored in any type of list.

Ff604040.Tip(en-us,office.12).gifTip:

Keep in mind that when you use versioning on a list, a new database record will be created for each item that is created or edited. This can become a problem for the size of the database over time, so make sure to limit the number of versions or to have a plan to maintain the database.

There are two types of versioning that can be used within SharePoint. SharePoint lists maintain versioning by creating a new copy of the row every time one is created or edited Document libraries have the ability to create major versions of the document (for example 1, 2, 3, 4) or major and minor versions of documents (for example 1.0, 1.1, 1.2, 2.0).

Required Check Out

In previous versions of SharePoint, users had the option of checking out files from a document library, but this did not occur very often. You now have the ability to require that the document be checked out prior to modifications, in order to prevent two users from making simultaneous changes to the same document. A notification message is displayed to the user, notifying them that they must check the file out before modifying it. The user can then select to check the file out and make changes, or not perform the operation and leave the document as it was.

Improved Storage with Lists

There are several techniques using lists that make storage easier or more functional for your needs. The following sections cover using folders, cross-list queries, and indexing.

Using Folders on All Lists Option

In the past, users could organize document libraries by using folders inside of the list, but this could only be done with document libraries in Windows SharePoint Services 2003. It is now possible to have folders on all list types simply by activating the option.

  1. Start by going to the Settings of the list.

  2. Select the Advanced Settings option.

  3. Under the List Advanced Settings, you will find the Folders section. To enable folders on the document library, select Yes under the Folders section. This will add the ability to have the New Folder option under the New menu of the list.

Indexing Lists

SharePoint now enables you to create an index on a list in order to improve performance when retrieving list items. In previous versions of SharePoint, it could be difficult to store large lists without having an impact on the performance of the site itself. Even though 2000 items per folder was large for some lists, it was not enough to use the lists as a real storage source for some external applications that needed much larger lists.

To solve this problem, SharePoint now allows lists to be indexed, allowing for the storage and use of much larger lists. To activate a column as an indexed column, navigate to the Settings page of the list and then select the Indexed columns from the Columns selection area.

Once you are on the Indexed Columns page, select the column that should be indexed. Keep in mind that a few resources will be used for every column that is being indexed, so try to keep it reasonable.

Using Cross-List Queries

A Cross-List query is a way to query a list that could be in the same site or another site and get back the meta data related to that list. This can come in useful when you need to display information about a list that is located in another site such as an HR department displaying information about a list in accounting. To make the retrieval of list data easier across multiple lists, the SPSiteDataQuery object can be used to bring back a collection of items. To perform the same operation in previous versions of SharePoint required the creation of custom code to bring back all of the list items individually from each list. To perform the query, the SPWeb object is used with a method called GetSiteData that passes in the SPSiteDataQuery object and returns a DataTable with the list items selected.

Follow these steps to enable the user to use cross-queries:

  1. To begin, create an SPSiteDataQuery object and create an SPWeb to search through:

    SPWeb site = SPContext.Current.Web;
    SPSiteDataQuery query = new SPSiteDataQuery();
    
    DataTable dtResults = site.GetSiteData(query);
    
  2. Using the CAML markup language, set the list types that will be searched through. Every list has a numeric value that is used to define the list.

    SPWeb site = SPContext.Current.Web;
    SPSiteDataQuery query = new SPSiteDataQuery();
    query.Lists = "<Lists ServerTemplate=\"107\" />";
    DataTable dtResults = site.GetSiteData(query);
    
    
  3. To define a query that will return the list items requested, first create a query in CAML.

    Ff604040.Tip(en-us,office.12).gifTip:

    To help create CAML statements, community members have created a CAML Builder at www.u2u.info/SharePoint/U2U%20Community%20Tools/Forms/AllItems.aspx and a CAML viewer at www.codeplex.com/SPCamlViewer.

    SPWeb site = SPContext.Current.Web;
    SPSiteDataQuery query = new SPSiteDataQuery();
    
    query.Lists = "<Lists ServerTemplate=\"107\" />";
    query.Query = "<Where>" +
                     "<Eq>" +
                       "<FieldRef Name=\"Status\" />" +
                      "<Value Type=\"Choice\">Not Started</Value>" +
                     "</Eq>" +
                   "</Where>";
    DataTable dtResults = site.GetSiteData(query);
    
  4. Because you are searching the entire site for information, the list data could be very large. The RowLimit property helps limit the size of data that is returned to you.

    SPWeb site = SPContext.Current.Web;
    SPSiteDataQuery query = new SPSiteDataQuery();
    
    query.Lists = "<Lists ServerTemplate=\"107\" />";
    query.Query = "<Where>" +
                     "<Eq>" +
                       "<FieldRef Name=\"Status\" />" +
                       "<Value Type=\"Choice\">Not Started</Value>" +
                     "</Eq>" +
                   "</Where>";
    query.RowLimit = 10;
    DataTable dtResults = site.GetSiteData(query);
    
  5. The ViewFields property allows you to specify the fields that will be part of the list of items returned. This way, only the fields that are important are returned, without all of the other columns that don’t matter. This also helps limit the amount of data returned to the user.

    SPWeb site = SPContext.Current.Web;
    SPSiteDataQuery query = new SPSiteDataQuery();
    
    query.Lists = "<Lists ServerTemplate=\"107\" />";
    query.Query = "<Where>" +
                     "<Eq>" +
                       "<FieldRef Name=\"Status\" />" +
                       "<Value Type=\"Choice\">Not Started</Value>" +
                     "</Eq>" +
                   "</Where>";
    query.RowLimit = 10;
    query.ViewFields = "<FieldRef Name=\"Title\" />";
    DataTable dtResults = site.GetSiteData(query);
    
  6. The Webs property allows you to manage the scope in which the query executes. The query is set to the current web site when created, but can be changed based on the Webs property. The current web site is determined from the method GetSiteData of the current SPWeb object. There are two possible values that can be used with this option: recursive and SiteCollection.

    • Recursive—Instructs the query to search all web sites below the current web site object.

    • SiteCollection—The query will search all locations that are in the same site collection as the web site object.

The following code demonstrates how you can limit the scope of your query just to the SiteCollection. This allows you to get data only from the locations that are required.

SPWeb site = SPContext.Current.Web;
SPSiteDataQuery query = new SPSiteDataQuery();

query.Lists = "<Lists ServerTemplate=\"107\" />";
query.Query = "<Where>" +
                 "<Eq>" +
                   "<FieldRef Name=\"Status\" />" +
                   "<Value Type=\"Choice\">Not Started</Value>" +
                 "</Eq>" +
               "</Where>";
query.RowLimit = 10;
query.ViewFields = "<FieldRef Name=\"Title\" />";
qry.Webs = "<Webs Scope=’SiteCollection’ />";
DataTable dtResults = site.GetSiteData(query);

Working with Site Columns

The data that is stored in SharePoint lists is described by site columns. These columns can be defined at a site level and describe the data that users will enter when they add new rows in the list. Many times you will create new columns or add columns from a predefined global list of columns.

Creating Site Columns

There are two different ways to add a column to a list. You can add a column from a list of existing columns or can create an entirely new column. SharePoint has a list of existing columns that are commonly used, such as address, city, date, and the like. However, if none of these commonly used columns is what you need, then you can add a new column that you create.

Adding an Existing Column

To add an existing column, follow these steps:

  1. In the Settings page of a list or library, click the option to Add from existing site columns.

  2. Once clicked, this link takes you to an Add Columns from the Site Columns page, where you can select and add columns from the already available columns. You can add any of the following columns from the existing groups to a list: Address, City, Date Created, and Status. There are many more columns, and each is listed in a category to help you find the columns quickly. The columns will be added in the order that you select them.

Creating New Columns

If none of the existing site columns matches what is needed, a custom column can be created:

  1. On the Settings page of the list, simply click Create column, or use the Settings menu of the list.

  2. Select the column name along with the type of information that will be stored in it. If currency is being stored, options would include the minimum and/or maximum value allowed, the number of decimals, and the currency format. If date and time information is being stored in the column, the options include showing the date only versus the date and time, the default date and time you want shown, and the ability to set a calculated value. There are many default types that data can be stored as. See the following table.

Table 7. Default types for data storage

Type Description

Single line of text

Used for text that will fit in a single line of text. Usually for text lengths with 255 characters or less.

Multiple lines of text

Contains more than one line of text. The number of lines can be set in the column definition.

Choice

Provides a number of items to select from. Options include Drop-Down menu, Radio buttons, and Checkboxes.

Number

Standard numbers such as 1, 1.0, 100. The minimum and maximum can be specified as well as the number of decimal places.

Currency

Display a number as the selected currency type. Holds the same properties as a number with the addition of the currency type.

Date and Time

Ability to use the date and time as the value of the field with the option include Date only or Date and Time. A default value is available for the current date or a specified date.

Lookup

Uses information already on the site to display in another list. This is useful for reusing data already on the site.

Yes/No

A simple check box that provides the list with Yes/No ability. A default value can be supplied and is set to Yes in the menu options.

Person or Group

Use this column to use information about the users and groups in the site. You can select from People or People and Groups and display selected information about them.

Hyperlink or Picture

Display a link or hyperlink to another resource. The format URL can be selected as Picture or HyperLink.

Calculated

Displays a calculated value that is based on other columns in the list. A subset of types is available to display the information once it is calculated.

Changing Column Order

Sometimes the column order can be important to the end users. The order can affect the way the data appears in a view. For this reason, SharePoint provides the ability to place the columns in the order that is best for your application.

  1. Navigate to a list on the site, then in the list Settings page, select Column ordering, which allows you to use the Change Field Order option.

  2. The columns can be set in any order from this page simply by setting the number order of each column. Notice that when you change the columns on the page, they actually move to the new position. When you change a column to a higher-order number, all numbers below that position are bumped down one.

  3. Change the column in position 7 to position 1. Each field name changes the number that is associated with it, for example position one becomes position 2, position 2 becomes position 3, and so on. Conversely, if a number is moved down in position, all numbers below it are moved up one.

  4. Change position 4 to position 7, then you can see that position 5 becomes position 4, position 6 becomes position 5, and position 7 becomes position 6.

Using Site-Level Columns

To allow for the reusability of columns, you can create columns at the site level or the list level. If you want to reuse a column across many different lists, the best approach is to create a site-level column. The command for this action is in the Site Settings menu under Site Actions. When you are on the Site Settings page look under the Galleries category and there is a listing for the Site Columns. Changing the column at the site level will change the value for all of the lists using the column. If a list needs to keep the column information no matter what the rest of the site has make the column a list-level column. A new or existing group must be assigned to the column being created, with the default group being custom columns. This group assignment will be used when selecting the column in a list. Additional column settings such as a description of the column can be provided, along with other options that are dependent on the type of information the column will store.

Modifying a Column

Columns can be modified after they have been created. On the list Settings page, click on the name of the column you want to change. For the example columns created above, click on Address. When the column is selected, a page shows the column name, its source, and the type of information stored in the column. It also allows the column to be a required column. Making a column a required column means that there must always be information stored in the column. If you modify the column from the site-level columns, you will also have an option to update all of the list columns based on that site column.

Next Part: Chapter 3: The SharePoint User Experience (Part 2 of 2) (Professional SharePoint 2007 Development)

Community Additions

ADD
Show:
© 2014 Microsoft