HOUR 9
Looking at List Types and the Included Web Parts

What You’ll Learn in This Hour

image Purpose of list types

image Which web parts are delivered with SPF 2010 that are not just representations of lists and libraries

image Purposes of standard and nonlist web parts

A lot of different ready-made types of lists come out-of-the-box when you install SPF 2010. Surprisingly, often people aren’t aware of the less commonly used of these built-in list types and spend time working out solutions to problems that could easily be solved just by using a built-in list type. This hour saves you that time in the future by giving you an overview of those less common list types and briefly working through where you can use them.

Understanding List Types

The SPF 2010 product includes several list types. This section discusses some of these list types.

By the Way

Refer to Figure 6.2 in Hour 6, “Using Libraries and Lists,” for a complete list of the possible list types. They’re shown in columns called Communications, Tracking, and Custom Lists.

The Announcements List

The Announcements list is intended for use as a web part on a website’s default page to present readers of the site with up-to-the-minute and important information. The Announcements list is almost always on the default page so that as many people as possible see this information. Be wary of changing the default view. The standard default view is designed especially for use on the site’s default page. Amending it might mess up the look, and it’s impossible to create a new view with the same look.

The Contacts List

The Contacts list contains useful contacts for readers of the website. So, for instance, if a computer services company uses the site for one of its customers, the Contacts list would consist of contact information for people in that customer company (and also probably for people from the computer services company who work with that particular customer).

Watch Out!

You cannot combine the contacts information in the site’s Contacts list with your Outlook contacts. Even if it is possible, there will be two separate Contacts items in Outlook, not just one that combines both sources. (For more information, see Hour 16, “Using Outlook 2010 with SPF 2010.”)

The Discussion Board

Naturally, the Discussion Board is used for discussions. There are both threaded and nonthreaded options for the look of this list.

The Discussion Board hasn’t improved much since SharePoint Team Services (2001), so don’t expect much functionality beyond the simple write-a-message, get-a-reply level of functionality.

The Links List

The Links list’s main function is to list useful web addresses with accompanying descriptions. I use it in my websites to list and link to both useful SharePoint articles and Knowledge Base articles.

The problem with the Links list is that the URL field consists of two parts: the URL and the description. So, for instance, when you open a Links list, you see a description listed in the URL field. When you click the description, the system actually uses the URL to go to the web page.

This isn’t a problem for users who tend to be happy to see something meaningful rather than an obscure website address; however, it can be a problem for administrators because Datasheet view (which normally enables bulk changes) does not list a Description field. It’s impossible to populate the Links list in bulk from, say, an Excel spreadsheet containing a URL column and a Description column.

The way around this is to add an additional column, perhaps called Site Description, and use this in the Datasheet view along with the URL column. In this way, you can bulk populate a Links list.

If you do this, all you will have is a URL field containing a URL (unless you copy the cells from a Datasheet View of another SharePoint Links list, in which case the URL columns you copy transfer both the URL and the Description). In other words, there’s no corresponding description. In such cases, Figure 9.1 displays where only the URL field has a value; the description field is empty.

FIGURE 9.1 Editing a single Links list item

image

By the Way

Figure 9.1 is what you see when adding an item to a links list of the type previously described with three additional columns/fields. When adding an item to a standard links list, the three rows in Figure 9.1 starting with “Issue Date” would not be visible.

After a bulk populate, it’s usually necessary to edit each item individually because then the Description field is available. In such a situation, it would be possible to copy the contents of the Site Description field into the second box in the URL section. It might not be the fastest process overall, but it’s not that demanding. If you don’t do this, the description will be assumed to be the same as the contents of the URL field, and that URL will be what you see in views of the list. So this tidying up process is important because most users want to see the description (in this case of a Knowledge Base article) and not a less meaningful URL.

The Calendar List

Typically, the Calendar list is used as a calendar only for the area covered by the website (for instance, for the customer company in the preceding example).

Like the Contacts list, the Calendar list is not merged with any Outlook calendar. If the Outlook version allows it (see Hour 16, “Using Outlook 2010 with SPF 2010”), however, this calendar can appear in Outlook alongside the Outlook user’s own calendar.

The Tasks List

The Tasks list relates to workflow. Workflows are covered in Hour 21, “Creating Workflows in SPF 2010,” and Hour 22, “Using SharePoint Designer 2010 to Create Workflows,” and are not mentioned further here.

Survey

A Survey consists of a series of manually created questions, each of which typically has multichoice, prespecified responses (with free text an alternative) the creator of the Survey can specify. New in SPF 2010 is the ability to branch to a later question than the next one in the normal order depending on the response to a question. The built-in surveys are even so rather simple, and it’s wise to look for more powerful third-party add-in products if you intend to use surveys in your SharePoint sites often.

The Custom List

A Custom list isn’t as custom as you might think. It’s just a list that doesn’t already (in contrast to the others) have a predefined role.

Typically, it stores simple data. I use it to store FAQs, where I have a Single-Line Text field for a question and a Multi-Line Text field for an answer.

Import Spreadsheet

In SPF 2010, the Import Spreadsheet option provides a way for you to move an existing Excel spreadsheet to an SPF 2010 site. If you use this option, a list is created from a set of cells contained in a spreadsheet. The result is a list in which each field/column name matches its respective column in Excel.

The list created using the Import Spreadsheet option and the Excel spreadsheet from which it’s derived are not connected. Changes made later to the spreadsheet are not reflected in the list. When the list is compiled, the spreadsheet and the list are two completely independent entities.

Watch Out!

Always delete the spreadsheet after you create the list from it. This forces your users to update only the SPF 2010 list.

Using Standard Web Parts with the Team Site

Now that you understand the various list types, let’s look at the standard web parts listed when you add a web part (see Figure 9.4 later in this section). To study these standard web parts, we set up a separate site for testing them.

Creating a Site to Test Web Parts

If you want a site where you can test web parts, you must first create one. Let’s start at the default page by following these steps:

1. To create the site, select Site Actions > New Site.

2. Name the (Blank) site Web Parts Test and specify the URL as http://spf1/

FIGURE 9.2 Creating the Web Parts Test site

image

WebPartsTest (see Figure 9.2).

I chose the Blank Site type for two reasons:

image It is a web part page, and web parts can be added easily to it.

image It is empty (unlike say a Meeting Workspace), so we can concentrate on the (test) web parts we add to it.

3. Click Create.

Adding Web Parts to the Test Site

To add a web part to your test site, follow these steps:

1. After the previous Create, you see an almost empty Web Parts Test site. Select Page in the menu bar (Tab).

2. Select Edit Page from the ribbon (on the far left). The screen shown in Figure 9.3 displays.

FIGURE 9.3 The result of Edit Page in a blank site

image

3. Click Add a Web Part in the left column. There’s a selection of four groups of web parts available at the moment for this site. (If we used one of the existing sites based on the Meeting Workspace, there would be more options in particular web part versions of the Lists in those sites.) Figure 9.4 displays.

FIGURE 9.4 Some of the available web parts

image

To the right of Figure 9.4, you can see on your screen an Add Web Part To section with a drop-down showing Left. Even though we clicked the Add a Web Part over the left column, we can still change our minds and have the web part added to the right column. In the next section, we actually add the web part.

Understanding Different (Nonlist) Standard Web Parts

This section introduces some of the web parts included in the Blank Site template that are not just representations of lists or libraries.

The Content Editor Web Part

The Content Editor web part is a way to include data in a section of a SharePoint web page that differs in look and feel from the rest of the SharePoint web page. The following steps will make what I mean by that clearer:

1. At Figure 9.4, click Content Editor to select it.

2. Click Add. What you now see is a Content Editor web part listed below the Add a Web Part section of Figure 9.2.

3. Click the downward arrow to the end of the line that starts with Content Editor.

4. Select Edit Web Part. Figure 9.5 displays where I expanded the Appearance section.

5. Change the name of the Title to Test Content Editor Web Part. An area on the screen displays named Test Content Editor Web Part.

6. Save the changes made by clicking OK.

The following steps are one way to create a suitable URL to put in the Content Link box, as shown in Figure 9.5:

FIGURE 9.5 Defining a Content Editor Web Part

image

1. Open Notepad while in the server.

2. Enter this HTML code into Notepad.

image

3. Save the file in C: as TextContentEditor.txt.

4. Create in the WebPartsTest site a document library called WPT Doc Lib by clicking the Documents link; then click Create and specify Document Library.

5. Upload the C:TextContentEditor.txt file to the WPT Doc Lib document library, as shown in Figure 9.6.

6. Right-click the name TestContentEditor and select properties. Copy (Ctrl-c) the URL that is listed there.

7. Go back to the home page of the WebPartsTest site, and again modify the web part (steps 3 and 4 before Figure 9.5).

8. This time paste (Ctrl-v) the URL of TestContentEditor into the Content Link section and test the Link.

Links of type file:/// are not accepted in the Content Link field, so we couldn’t directly refer to the TestContentEditor.txt file in its original location. By putting the file in a document library in the same site, we ensure that people with rights to access the site can access the file and that the web part would function as we intended.

9. Click OK, and Figure 9.7 displays.

FIGURE 9.6 Putting the Content Editor file in a Doc Lib to give a URL

image

FIGURE 9.7 An example of using the Content Editor web part

image

10. The final step could be to remove the name and leave just the Key Personnel diagram. Check out the options in the right-hand section of Figure 9.5 to see how to do that if you want to experiment with this; otherwise, just move on.

The HTML Form Web Part

The HTML Form web part is a single entry box with a Go button (refer to the left half of Figure 9.8). It doesn’t look like much, but as you’ll see, even the simplest version of this web part type (which is all we look at here) is useful.

To use the Form web part, we first need some data, and then we run through how web part connections work (something else that is simple but useful).

FIGURE 9.8 Stage one of showing how to use the Form web part

image

To show how this works, I created a custom list, added two columns to it (Company and Location), and populated the columns with some data. (If you want to do this, look at the right half of Figure 9.8 to see which columns and values were added.) When that was done, a web part of that new list was available.

In the same page used for earlier exercises, I did the following:

1. I selected Add a Web Part in the rightmost column. The list of possible web parts appeared, and the new web part was now listed. (A new section was available in Figure 9.4 [in Categories] called List and Libraries that included both the newly created WPT Doc Lib and the Custom List I called CustomListforHTMLFormTest.)

2. I selected it.

3. I clicked OK.

The rightmost column of Figure 9.8 contains the web part version of that new List; that is, I created a new view called WebPartView where I had removed both the Title column and the attachments column from the View when I created the Custom List.

By the Way

Pop-ups should be enabled for at least this site before performing the following steps.

Now add an HTML Form Web Part with a similar technique. (Don’t bother changing the name of it.)

1. Add a web part in the left column.

2. Select the HTML List Web Part for the web part types listed.

3. Click OK.

Now that that both web parts are available, we can set up a connection between them (a so-called web part connection):

1. Click the small arrow next to the Edit button in the web part of the list we just created.

2. Then on Connections, select Get Filter Values From. Often we have a number of possible web parts to connect to. In Figure 9.9, however, we have just one choice: HTML Form Web Part.

FIGURE 9.9 Starting web part connections

image

By the Way

When adding content to the list, the Title field is compulsory. So I used dummy values of 1 to 12. The key data in this list for this HTML Form Web Part test is the repeated company names and the non-repeated (for each company) locations.

3. Select HTML Form Web Part. A pop-up appears (see Figure 9.10).

4. There is only one column in our standard HTML Form web part, so that dropdown has a single entry (T1). We then need to decide if we want to link the HTML Form Web Part to Company or Location (the drop-down lists all fields in the list, not just those). We decide on Company.

5. Click Finish.

6. Click Stop Editing.

Now we see Figure 9.8 again. The CustomListforHTMLFormTest web part (in the text that follows I use CL1 for this list) still shows all possible Items.

7. Write IBM into the HTML Form Web Part field and click Go. You now see Figure 9.11 (compare this with Figure 9.8).

FIGURE 9.10 Configuring the web part connection

image

FIGURE 9.11 The result of entering IBM into the Form web part

image

Entering IBM in the HTML Form web part connected to CL1 has filtered the information that CL1 shows us. CL1 the list still contains rows for HP, IBM MS, and Oracle, as does CL1 the web part of that list (because we are using a nonfiltered view for it). However, CL1 the connected web part displays only the information about the company the user of this page chose to specify in the HTML Form web part.

The Image Viewer Web Part

The Image Viewer web part enables you to position an image on any part of a page to which a web part can be added. Other methods of adding images to a page require coding changes, so they are less straightforward.

With the Image Viewer web part, you need to point at an image that all the people accessing the page have the rights to see. One such location is the /_layouts/images/ directory, which is the storage location for the homepage.gif image (the photo of some people). You can verify this by looking at the Site Image web part (which is a standard Image web part that has been renamed) via Modify Shared Web Part.

Another way to guarantee that everyone can access the image is to create a site (or subsite) that everyone has access rights to (safest way is to allow anonymous access; see Hour 10, “Learning About Authentication and Access Rights”) and within that site create an image library. Upload your images to this newly created image library. Then use an appropriate version of the image from the image library in the URL field of the Image web part.

Did you Know?

One way to get an “appropriate” version is to open the image library and right-click one of the images that, at this point, appears in a reduced-size form. Select Copy Link Location. Enter this link into the URL field of the Image web part (Ctrl-v) and click Test Link.

You’ll probably see more than you want to (not just the image, but the image’s metadata). So on this test image, again right-click. Select Copy Location and enter this new value into the URL field of the Image web part. Now at least you’ll just have an image being displayed.

The Page Viewer Web Part

The Page Viewer web part does just one thing, but it does it well. It enables you to incorporate any page that can be accessed from the Internet into your SPF 2010 site. For instance, a page in an Internal Dell SPF 2010 site could include a (public) HP Hardware Announcements web page so that Dell people can quickly see new HP announcements.

To see the example shown in Figure 9.12, follow these steps:

1. Add a Page Viewer web part to the page.

2. Select Edit Web Part.

3. Enter http://wssv4faq.mindsharp.com into the URL field.

4. Click OK.

5. Click Stop Editing.

FIGURE 9.12 An example of using the Page Viewer web part

image

The Picture Library Slideshow Web Part

The Picture Library Slideshow web part shows a slide show of images and photos from a picture library. (You’d never have guessed!)

The Relevant Documents Web Part

A relevant document is a document that the user who is accessing the page (“me”) has done something with. The choices are Has Created, Has Checked Out, and Has Last Modified (see Figure 9.13).

FIGURE 9.13 An example of using the User Tasks web part (in the right column)

image

The Silverlight Web Part

The Silverlight web part is beyond the scope of this book because using it requires programming knowledge. The sole parameter for it is a URL that contains the address of a Silverlight Application Package (.xap file).

I suspect that over time we’ll see a lot of user-supplied .xap packages both useful and not (and free and not).

The Site Users Web Part

The Site Users web part shows the administrator at a glance which groups of users can access the site.

Some possible options are

image Show People in This Site’s Member Group

image Show People in the Group: (Where You Specify the Group)

The User Tasks Web Part

The User Tasks web part is similar to the Relevant Documents web part (see Figure 9.13) in that it shows only items that have been entered elsewhere (in this case, naturally, in a Tasks list rather than in a Documents list).

The XML Viewer Web Part

The XML Viewer web part is similar in operation to the Content Editor web part.

Because writing XML code is beyond the scope of this book, I’ll leave it to the XML experts among you to wonder about how you could use XML code in a web part.

Summary

We looked at the list types that haven’t been mentioned earlier and examined what they are good for and potential problems associated with their use.

We then looked at the default web parts that come with SPF 2010. We saw when each of them is used (when appropriate) in actual examples of their use.

Q&A

Q. I can’t find the /_layouts/images/ directory. Where is it in the file system?

A. Find this directory: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions14TEMPLATELAYOUTS.

Q. How do I transfer web parts from one column to another?

A. Use the following steps to move a web part from the left column to the end of the right column:

1. Click the arrow on the top right of the web part you want to move and select Edit Web Part.

2. In the new box on the right of the screen, expand the Layout section.

3. Change the Zone to Right and the Zone Index to 10.

By the Way

It’s helpful to use increments greater than 1 when specifying the position of a web part in the zone. Using 10 is perhaps overkill, but it ensures that the web part is at the bottom of the list, even when other web parts are added to the zone.

Workshop

Quiz

1. What do the Contacts list and the Calendar list have in common?

2. I want to add a web part to my page. When I choose Site Actions > Other, however, I don’t see any web parts that were discussed in this hour.

Answers

1. Both lists can be synchronized with some versions of Outlook, and yet the copy of both lists in Outlook is separate from your Outlook Contacts and your Outlook calendar.

2. You don’t see any web parts because what you do see when you select Create are lists and library types (and sites!) from which you can create a new list or library or site. To add a web part to a page, start by going to Site Actions > Edit Page.

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

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