Woody Windischman


It's in There - Automatically Maintained Columns in SharePoint Lists

Nov-152008

MMj02347000000[1]Over the last few weeks, I have veered a bit "off topic". But now that TechEd is over, it is about time to bring things back on track. So today, I'm getting back down to the business of helping you to understand SharePoint with another "Back to Basics" article on the subject of Lists and Libraries.

In this article, I introduce you to some columns that SharePoint creates and manages automatically, and describe some of the ways these can be useful. In the process, you will see how to create a custom list or library view.

Introducing the System Columns

Every list and library type you can create in SharePoint has certain unique characteristics, including fields/columns specific to that list type, a default set of views, etc... (See A List, A View, a Part, in SharePoint) But in addition to the things that make a particular list or library unique, SharePoint also creates a set of System Columns that are common to all lists and libraries. Generally speaking, these columns are "Read Only" from the user's perspective (i.e. users can't directly update them on their own), but they contain very useful information, such as who created the item, and when. They are maintained by SharePoint itself.

The automatically generated, or System, columns in a SharePoint list or library include:

Content Type

Contains the content type of the item. If you have enabled multiple content types for the list or library, users can update this column.

Created

This is the date and time the item was first created. This never changes.

Created By

This is the user who initially created the item. This never changes.

ID

Each item in a SharePoint list or library is assigned a sequential, numeric ID (starting with "1"). This never changes.

Modified

This is automatically updated any time an item is updated.

Modified By

This is the user who made the most recent change to the item.

Type

This is mostly used in libraries. The extension of the file uploaded to the library is stored and used to select an icon to display in your view.

Version

Display's the item's version. If you have versioning enabled on your list, it reflects the version currently being displayed. If you do not have versioning enabled, it displays either 1.0, or the last version number that was created while versioning was enabled on the list.

If the list or library is set to require Approval, two more columns are added to the list automatically. I'm listing them here for completeness, but because they can effectively be edited by site users (with appropriate rights) I won't be discussing them in the rest of this article.

Approval Status

Whether the current item is Approved, Rejected, or Pending. People with permission to approve can change this column.

Approver Comments

When an approver updates the status of the item, they can enter information into this column.

While your users can't update most of these columns, they can be read and used when creating views. Consider the view below...

image

This view includes the Title of the item, and all of the automatic columns described in the first table. From this, you can tell a lot about this list. For example, Content types are enabled (the two items have different types). You can also tell that versioning was - at least temporarily - enabled, but was also disabled for some time, because the first item shows a 2.0, while the second item, even though it was clearly modified (notice the different Created and Modified information), is still showing 1.0 for the version.

Note: Normally, you won't be arbitrarily mixing content types in a list, or enabling and disabling versioning. I have done so on this list simply to illustrate possible different values for these columns, and their behavior.

Using the System Columns

This information, even though you don't enter it yourself, can be very useful. For example, you don't have to worry about someone manually changing records of when a file was last updated. While SharePoint maintains this info, it is available for you to use in customizing your users' experience.

Suppose you want give your users a view of only "their" items? That's as easy as creating any other view in SharePoint!

From the "View" drop-down, select Create View. You are given several options:

image

Notice that, in addition to the stock view formats, you can create a new view using a existing view as its basis.In this case, we're just going to create a Standard View.

I'm going to call the view "My Items", leave it a public view, and include the same custom columns I used in the view above. Notice that you can select the automatically system-maintained columns just like any other column for your list or library:

image

Scrolling on down the page, I'm going to set filters on the Created By and Modified By columns, looking for the token [Me] in either location. This token resolves to the User ID of the person currently viewing the page, so if the current user either created or updated the item, it will be listed for them. Otherwise, they won't see it. (For consistency, I've also chosen the "Boxed" style to match the earlier view.)

image

Now, if Amelia signs in and selects the "My Items" view, she only see the item she edited:

image 

Summary

For any list or library you create, SharePoint creates a set of system columns that it manages automatically. Although your users generally can't edit these columns, you can use them just like any other in the creation of views. I demonstrated one option, filtering based on the current user. But you can also use these columns for sorting and grouping your views as well.

I also showed you how to create a filtered list view, and a select a specific layout. That process applies equally well to columns specific to a particular list or library type, and to columns that that you create.

 
Posted by Woody Windischman | 0 Comments | Trackback Url | Bookmark with:        
Tags: Administration, Customization, Lists and Libraries, WSS, SharePoint

Links to this Post

Comments

Name:
URL:
Email:
Comments: