HOUR 6
Using Libraries and Lists

What You’ll Learn in This Hour

image Main areas of the default site page

image Differentiating among a List Type, a List, and a List View Web Part

There is often great confusion even among people who have been using SharePoint sites for a long time as to what the difference is among a List Type, a List, and a List View Web Part. Because of the confusion, this hour, in addition to looking at the basic elements of a site, spends a lot of time looking at the differences among these three kinds of List-related elements of an SPF 2010 site.

Understanding the Basic Site Elements

To understand the concept of lists and libraries, the first section of this hour focuses on the links to list and libraries in the standard website.

The version of the default site you can see now (Figure 6.1) includes the two subsites that you created. These are neatly placed horizontally next to the original Home. If you click BookSite1, this section of the page vanishes, and you need (as you have previously seen) to click the Navigate Up icon to go back to Team Site.

The section vertically below the word Home is the Quick Launch section.

The Quick Launch section created for the default site consists of three main sections (Documents, List, and Discussions) and within them links to one or more other features. These other features with the exception of the first (Site Pages) are all different kinds of Lists.

If you now go to Site Actions > More Options, you see a list of things that can be created, as shown in Figure 6.2. Most of these (apart from the Pages and Sites) are Lists, too.

FIGURE 6.1 Looking more closely at the default page

image

FIGURE 6.2 List types that you can create

image

This, as stated in the figure caption, is a listing of List Types that can be created.

You should especially note here the following: Document Library, Calendar, Tasks, and Discussion Board, because we’ll come back to them after first learning the difference between a List and a Library.

Did you Know?

This is the look you get if you haven’t installed Silverlight. It’s a clean, practical look (if nonsexy) that is suitable for work done by an Administrator on a server. I therefore don’t recommend that you follow the “Improve the Creation Experience” suggestion and install Silverlight (on your server).

Differentiating Between a List and a Library

A List is the basic way in which information is stored in a SPF 2010 site.

All the items in Figure 6.2 when accessed generate a List. Columns 2 through 4 are only there to split up the kinds of Lists that are created into logical groups.

But Column 1 is a separate column because all the items listed are for a special kind of List known as a Library.

The main difference between a Library and a List is that an item in a Library must contain a file.

image The main function of a Library is to store files and the accompanying metadata to those files.

image The main function of a List is to store data

The other main difference is that because document libraries always contain a file, it’s possible to have versioning of files.

Did you Know?

People new to SharePoint have problems differentiating among a List Type, a List, and a List View Web Part, so don’t skip the next section. It will save you a lot of time later!

By the Way

You probably already have Silverlight installed on your client machine. In Hour 16, “Using Outlook 2010 with SPF 2010,” Figure 16.16 is a screenshot of what you see in your browser when accessing this same screen from a client system with Silverlight installed. (If you don’t want to hunt for Figure 16.16, it has large icons rather than text, and the columns here are links that appear in the left column in Figure 16.16.)

Differentiating Among a List Type, List, and List View Web Part

1. Look again at Figure 6.1 and click Calendar (see Figure 6.3).

2. Now make an entry in the Calendar—say for about 2 weeks from now.

By the Way

From now on I’ll use the term “List” for a List that isn’t a Library, “Library” for a type of Library, and “all kinds of Lists” when I mean either a List (that isn’t a Library) or a Library.

FIGURE 6.3 The Calendar is included in the basic installation.

image

By the Way

You can add links to one or more files as part of the metadata of Lists. This, while possible, is rare, and the links to the files typically are much less important that the data in the List.

Did you Know?

Don’t get too enthused by the idea of using SPF 2010 as a Version Control system. That’s not what Versioning is for. Versioning (of major and minor versions) is fine for working on a company document and keeping track of amendments to it, but it is not suited for source code.

3. Double-click a specific day (see Figure 6.4).

FIGURE 6.4 My Test Calendar

image

4. Fill in the New Item form, as shown in Figure 6.4.

5. Click Save. The screen now shows a new version of Figure 6.3; this time there is an entry on the 15th of December, 2009 (in my case).

6. Go Back to the default page via the Navigation Up icon and Team Site. No change to that page is visible.

By the Way

We’ve done this before in Hour 5, “Planning a Site’s Structure,” so I won’t repeat the screenshots. Look at Figure 5.8, which matches step 3.

Next we’ll do a similar action with the entry for Shared Documents. Because this is a Library, we’ll add a file to Shared Documents. The following steps are the way to do that:

1. Click Shared Documents.

2. Click Add a Document.

3. Browse for a .txt file and upload it to the site.

We now have a library called Shared Documents that includes a single Text file called weeklyblog.txt (see Figure 6.5).

FIGURE 6.5 A list of the files in Shared Documents

image

Now return to the Team Site page. Figure 6.6 shows that the section of the main part of the page (the heading “Shared Documents”) now includes a file called weeklyblog.

So far we have used a Library called “Shared Documents” and a Calendar called “Calendar,” both of which were created for us by the installation routine.

We can also create our own. Let’s create our own Library called “OurDocumentLibrary.” We can do this using Site Settings > More Options (see Figure 6.2).

1. (At Team Site) Click Site Actions > More Options.

FIGURE 6.6 A home page

image

2. Click Document Library, as shown in Figure 6.7.

FIGURE 6.7 Creating a new Document Library

image

3. Click Create.

4. Go back to the Team Site (Navigate Up icon again).

The default page now has an additional entry in the Quick Launch section—at the end despite the name.

By the Way

Did you notice the text in the description? Despite its name, the already existing document library called “Shared Documents” is not the only document library where documents can be shared. That name has confused users from earlier versions of SharePoint, but it remains.

Now we have enough material to enable us to give an understandable explanation of the differences between a List Type and a List. (The List View Web Part follows.)

image List Types are what you saw in Figure 6.2. A List Type is a definition of a kind of List. Earlier in the book, we used the List Type “Document Library” to create a Library called “OurDocumentLibrary.” Microsoft, as part of the installation routine, used the List Type “Document Library” to create a Library called “Shared Documents.” Microsoft also in the installation routine used the List Type “Calendar” to create a List called “Calendar.”

image A List is created using a List Type. Several Lists with different names can be created from the same List Type. Content is added to a List. Each List is a separate entity. If content is added to a List, that content is only in that one List and not in any other List created from the same List Type (unless also added specifically there).

Did you Know?

If you dislike the order of Items in Quick Launch, you can change it by selecting Search Actions > Site Settings > Quick Launch.

I hope that clears up the difference between a List Type and a List. Microsoft did us no favors by sometimes (Calendar, Tasks) creating as part of the installation Lists with the same names as the List Types they were built from and sometimes (Shared Documents, Team Discussion) creating Libraries/Lists with different names to the List Types they were built on.

The Difference Between a List and a List View Web Part

If you were watching carefully earlier, you might have spotted one example of a List View Web Part.

A List View Web Part is a representation in web part form of a List or Library.

When we added a file to the Shared Documents Library, we first saw the List containing the file (see Figure 6.5). We then went back to the default site page (see Figure 6.6) and saw that the Shared Document (main) section of the default site page also showed the same file. This is because what is visible in the main section of the default site page is the same list in a different form. It is officially called a List View Web Part.

By the Way

For now, let’s just say that a web part is a function that can be added to a page like the default site page.

Now that we’ve got that straight, let’s create our own simple List View Web Part.

We already added an entry to the List called “Calendar” (see Figure 6.4), so let’s create a List View Web Part from that List using the following steps:

1. (At Team Site) Click the Edit icon (to the right of the Navigate Up icon), as shown in Figure 6.8.

FIGURE 6.8 Editing the default page text

image

By the Way

In WSS 3.0, this was less pretty but required far fewer actions to add a List View Web Part. (Is this progress?)

Here for the first time you can see that the 2010 SharePoint products have acquired the same look as Office 2007. (It was there in some other screenshots but hardly noticeable).

This particular set of editing tools that focuses on texts and fonts isn’t what we need this time.

2. Click Insert in the top menu line under the Editing Tools heading (see Figure 6.9).

3. Click Web Part (see Figure 6.10).

4. Click Calendar and OK (see Figure 6.11 in a couple of pages).

As you can see, if you scroll down the page, the Calendar has been added to the main section of the default page just above the “Welcome to the Site” section. We won’t change that location but note that having the whole calendar there takes up a great deal of space.

FIGURE 6.9 Editing the default page insert

image

FIGURE 6.10 Editing the default page—Web Parts

image

The following steps show what to do to convert this into a Summary View that will only show appointments (in this case, one):

1. Click the downward-facing arrow at the end of the line containing the Calendar heading. This arrow is visible if the mouse is hovering above the line following the calendar text.

2. Select Edit Web Part.

FIGURE 6.11 The Calendar has been added to the central section.

image

3. Move to the right of the screen (see Figure 6.12).

FIGURE 6.12 Modify the Calendar Web Part

image

4. Change the Current View to Summary View.

5. Change Toolbar Type to No Toolbar.

6. Click OK (see Figure 6.13).

As you can see in Figure 6.13, the entry we made in the Calendar List is visible in this Calendar List View Web Part (LVWP). That’s because this Calendar LVWP was based on the Calendar List, and the View of the List we chose to display did not exclude this particular calendar item. (Views are discussed further later in this hour.)

Finally, we need to save the changes we’ve made under Edit. There are two alternatives (see steps 7 and 8).

FIGURE 6.13 The Calendar Summary View

image

7. Save using the diskette icon, which is in the location where the Edit icon previously was.

OR

8. Leave Editing (such as via clicking All Site Content in the left-hand-column). Then you will be asked if you want to save your changes.

By the Way

When you have a screen that looks like Figure 6.13, try clicking some of its sections (Calendar, Shared Documents, and the Image) You can see the menu bar options change accordingly. Figure 6.14, for instance, is part of the menu bar when the image is clicked.

Did you Know?

If for some reason you decide you don’t want to make changes, following step 8, you can choose No to take you back to the state before the Edit.

FIGURE 6.14 An extended Menu Bar after a single click on the image

image

Summary

The main part of this hour has been learning about the differences among a List Type, a List, and a List View Web Part. These differences are summarized in the following bullets:

image A List Type is ready-made code supplied with the product that contains certain functions. When you (or the installation routine) create a List, you decide which List Type you are going to use to provide the functionality of that List.

image The List is the sole one of List Type, List, and List View Web Part that contains data.

image A List View Web Part is only a representation of a List. Depending on the View chosen for it, it contains all the data from the list or only some of the data of the List.

Views will be covered properly in Hour 8, “Creating and Using Views and Folders.” Here we have just glanced at them.

Did you Know?

There are two different kinds of List View Web Parts in SPF 2010. The second kind called “XSLT List View Web Parts” or “XLV” will be discussed later. The preceding description (no own content) applies to both kinds of LVWP.

Q&A

Q. I lost count of the number of times we did things with Calendars. Why were there so many different things that were Calendars, or were they all the same thing?

A. In the present site, there are four things called Calendar:.

1. There’s a Calendar List Type (code that provides Calendar functionality).

2. There’s a Link in the Quick Launch section (a Link that goes to a List called Calendar that the installation routine created using the Calendar List Type).

3. There’s a List called Calendar (created by the installation routine using the Calendar List Type).

4. There’s a List View Web Part called Calendar (created using the List called Calendar to provide its content).

Q. Are there any differences between the default page of the main site and the default pages of the subsites we created using the default Meeting Workspace template?

A. Yes, the default site created by the installation package uses the Team Site template. This—in the 2010 products—creates a default page that uses the Wiki page type. The default page created by the Meeting Workspace uses the Web Part page type.

The Wiki page type is more powerful but more difficult to use. In this hour, the Summary View of the calendar would have been better located below the Welcome text, but explaining how to do this is beyond the scope of this hour. As we see later, adding and positioning a calendar to a page of the Web Part type is much more straight-forward.

Workshop

Quiz

1. What is the main difference between a Library and any other kind of List?

2. Is Shared Documents the only Document Library that is shareable?

Answers

1. The main difference is that a Library item must include a file.

Document Libraries and other kinds of Libraries are thus storage locations for files and the metadata about those files. Other kinds of Lists contain data and cannot contain files. (They can however contain links to files if a file is required to add value to the data in the List.)

2. No. All Document Libraries are as shareable as the Document Library that

Microsoft created in the Installation of SPF 2010 by using the Document Library List Type and choosing to call Shared Documents. It is just a name—they could have picked a better name in my opinion as this particular name has confused people in earlier versions too not just in SPF 2010.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset