Partager via


Field Definition Schema

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Each element manifest file that defines site columns must adhere to the Field Definition Schema.

A site column is a reusable column definition, or template, that you can assign to multiple lists across multiple SharePoint sites. Site columns decrease rework and help you ensure consistency of metadata across sites and lists. For example, suppose you define a site column named Customer. Users can add that column to their lists, and reference it in their content types. This ensures that the column has the same attributes—at least to start with—wherever it appears. Much like site content types, you define a site column at the site level, independent of any actual list or content type.

For more information about site and list columns, see Introduction to Columns.

The Field child element inherits from the same complex data type as the Field Element (List - Definition) element, and as such, also contains all the attributes and child elements specified for that element. For more information about those additional attributes and child elements, see Field Element (List - Definition).

Example

Description

Following is an example of the XML that defines two of the site columns included in Windows SharePoint Services 3.0. Elements have been edited for readability.

Code

<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 
    Type="User" 
    DisplayName="My User Column" 
    List="UserInfo" 
    Required="FALSE" 
    ShowField="ImnName" 
    UserSelectionMode="1" 
    UserSelectionScope="0" 
    Group="Custom Columns" 
    ID="{CC0F36E3-4BB2-4ba1-8872-D941C9223D92}" 
    SourceID="{d7d2586b-0e43-4481-8cba-bf959098bf6a}" 
    StaticName="MyUserColumn" 
    Name="MyUserColumn" >
  </Field>
<Elements/>

See Also

Concepts

Introduction to Columns

Other Resources

Columns