The Result Data Newsletter   
Volume 804 - April 2008   
© Copyright 2008 Result Data Consulting, Ltd.  614-505-0770  www.resultdata.com   

    Result Data Home Page  |  Newsletter Archive  |  Upcoming Events  |  Classes & Workshops  |  Request Information
Upcoming Events:  Mid Ohio BusinessObjects User Group: 5/20, Discover the Power of BusinessObjects XI 3.0:  5/20

Return to Newsletter Contents...

 

SharePoint Content Types

by: Michael Mullin, Consultant, MCAD, CRCP, MCTS

Content types were one of the major enhancements that accompanied the release of Windows SharePoint Services 3.0. Unfortunately, it is a concept that many users have trouble grasping. Furthermore, it usually isn’t explained very well and some of the explanations seem designed to increase confusion rather than enlightenment.

Assume we wish to create a site for tracking books in a library. This site might have a list detailing each book which the library owns. It might also have a list of books which have been lent out, and a list of books which are past due. We might also have a list of books which we wish to buy. The common thread in all these lists is books.

There is certain information about a book which we will always want to track: title, author, publisher, edition, ISBN numbers (both types), illustrator, publication date. Each of these items will be recorded in a column of the list. Since we have several lists dealing with books, this will require a lot of repetitive work. It would be much easier to define the item once, and then assign that definition to each list. This can be done with a content type.

The first step is to create a custom site column for each item of information which we wish to store. We then create a new content type and add those columns to it. This would be our Books content type. We assign the Books content type to each list we create and all those columns are immediately available.

Besides being easier to set up, the Books content type makes maintenance tasks easier. Suppose it is decided that we want to track the birth date of the author. Without a content type, we would be required to go to each list and edit its list of columns, with a content type, we add the new column to the content type and the column is immediately available in all the lists.

But a content type is more than a named collection of site columns. A workflow can be attached to a content type. So can a customized document information panel and information management policy settings. While our discussion has centered on list items, content types can be created for documents too. When creating a document content type a document template can be assigned to it.

While the Books content type certainly is a convenient way to add columns, the astute reader may see a problem here. It is probable that each list will have some unique columns. For example, in the list of books lent out we would want to know to whom we lent the book, so it would need a column for the borrowers name. If we add that column to the Books content type, it would be included in all the lists using the content type which would not be appropriate.

You may think that the solution is simply to add the columns to the list’s columns collection. However, a content type exists independently of the list’s columns. When you edit the properties of a content type, only those columns explicitly assigned to the content type are available to edit, the columns of the list to which the content type is assigned are not available. This is true even if the list column has been marked as required.

This brings us to the concept of inheritance. Microsoft created two basic content types for SharePoint: List Item and Document. Every other content type must be derived from one of those two content types. Since our Books content type is for a list item, it would be derived from the List Item content type. When a content type is derived from another content type it inherits the properties of the parent content type.  Thus any columns or workflows which belong to the parent also belong to the derived content type. If the parent content type is altered, by adding a workflow or deleting a column, that change would be propagated to all content types derived from it.

When you create a new content type, you select which existing content type to derive the new content type from. In our example, we would create a new content type, Books Lent, which would be derived from Books. We would add a column for the borrower’s name, due date and email address. We could then add a workflow which would send the borrower an email to remind them to return the book on time. This way we have unique columns in the Book’s Lent list while still maintaining the advantages of using a content type.

Go to Top  |  Return to Newsletter Contents

The Result Data Newsletter is published approximately once a month to share the latest information on business intelligence, data management and CRM. There should be a link below to allow you to change or remove yourself from our list. We take your requests very seriously. If you have any difficulty please contact us at 614-505-0770 and we will make sure that your request is handled properly. This is not intended to be an unsolicited message and you can reach us in person if needed.

© Copyright 2007 Result Data Consulting, Ltd. - All Rights Reserved
All trademarks and copyrights are the property of their respective owners. This information is provided without warranty.
Announcements
Save Big $$ On Gas This Spring
Schedule and attend any one of our qualifying public training classes from April through June 30th to receive up to $385 in gas cards OR  receive 10% off the normal class price.  Please contact our office for further details on promotion amounts and qualifying classes.   Restrictions apply and you must mention the promotional code Gas08 at the time of registration to receive the promotion.  Call 614-505-0770 for further details and restrictions.
Columbus Roadshow - Discover the power of BusinessObjects XI 3.0
See how you could put complete, trustworthy business intelligence into the hands of all of your people wherever their location.  This event will be held on May 20, 2008 at the Fawcett Center.  Call 614-505-0770 or click here for more information and to reserve your seat.
Mid Ohio BusinessObjects User Group
Join us for the Spring MOBOUG User Group meeting on May 20th. Call 614-505-0770 or click here for more information and to reserve your seat.
Looking for a Few Good Men and Women
Join our award winning team of Business Intelligence consultants and .Net Software developers.
Send your resume and salary requirements to:
jobs@resultdata.com