Column Template or Site Column

SharePoint 2007

A site column, also known as a field, is a reusable column definition, or template, that can be assigned to multiple lists or content type definitions across multiple SharePoint sites. Site columns are easily reusable and help ensure the consistency of metadata across sites and lists.

Real World Example

A program management office wants a common column in each document library and list on their Web site to track common project codes. A Web designer creates the site column and then adds it to each existing list and document library in the Web.

Technical Details

Site columns are a Windows SharePoint Services 3.0 schema structure that is used as a template that can be used in lists and content type definitions. They can be defined using features, or using the Windows SharePoint Services user interfaces or object model. A column can reference an existing content type.

The following is an example of a column feature from the Windows SharePoint Services 3.0 SDK:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <Field ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Name="Created" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Created" Group="_Hidden" ColName="tp_Created" RowOrdinal="0" ReadOnly="TRUE" Type="DateTime" DisplayName="Created" StorageTZ="TRUE">
   </Field>
   <Field ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Name="Author" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Author" Group="_Hidden" ColName="tp_Author" RowOrdinal="0" ReadOnly="TRUE" Type="User" List="UserInfo" DisplayName="Created By">
   </Field>
</Elements>

When a column is added to a list, Windows SharePoint Services copies the site column locally into the list as a list column. Changes can then be made to the list column and these changes apply only to the column as it behaves on that list.

Support Details

A site column cannot be deleted if a site collection contains any lists or content types that contain a reference to the site column.

Community Additions

ADD
Show: