Field Element (Field)

Defines the properties of a single site column.

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 more information about site and list columns, see Introduction to Columns.

<Field
  ID="Text"
  Group="Text"
  MaxLength="Text"
  SourceID="Text"
  StaticName="Text"
/>
Attributes

Attribute Description

ID

Required Text. Specifies the GUID of the field.

Group

Optional Text. Specified the site column group to which this site column belongs.

MaxLength

Optional Integer. Specifies the maximum number of characters allowed in a field value. Edit forms are adjusted to enforce this value, which is validated on the client. If the user attempts to enter more than the number of characters set by MaxLength, an error message appears.

SourceID

Optional Text. Contains the namespace that defines the field, such as http://schemas.microsoft.com/sharepoint/v3, or the GUID of the list in which the custom field was created.

StaticName

Optional Text. Contains the internal name of the field.

Child Elements

None. (See Remarks)

Parent Elements

Remarks

This Field 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

For an example of how this element is used, see Field Definition Schema.

See Also

Other Resources

Columns
Introduction to Columns
Field Definition Schema

Tags :


Community Content

LZandman
Maximum length StaticName is 32 chars!
It looks like the StaticName (Internal name) field has a maximum lenght of 32 characters. If you specify a longer name the final part gets chopped off! This might break your CAML queries, because you often have to use the internal name in them.

MichaelLeppan
What about the rowOrdinal Property?

There seem to be a lot of attibutes that are not documented? Here are a few:

rowOrdinal, Sealed, Hidden, required, fromBaseType... the list goes on....

Where is the "complete" documentation located for a field?

Tags :

Eduad Ralph
The other properties
In reference to the foreposter and a tribute to my own question: if your looking for all the other fields, follow the link under "Field Definition Schema"
Tags :

Ethand
Name attribute is important
The Name attribute is important. It must be unique. If you preivously have used the name in another feature, you have to change to something else.
Tags :

Page view tracker