Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Fields Element (List)

Last modified: April 15, 2010

Applies to: SharePoint Foundation 2010

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Contains field definitions for a list definition within a Schema.xml file, or for a base list type within the global Onet.xml file, specifying the fields that are implemented in a list.


<Fields  Revision = "Integer">  ...
</Fields>

Attribute

Description

Revision

Optional Integer.

Minimum: 0

Maximum: 1

The following example from the Schema.xml file for tasks lists specifies fields uniquely used in a tasks list.

<Fields>
   <Field Type="Choice" Name="Priority" DisplayName="Priority" >
      <CHOICES>
         <CHOICE>(1) High</CHOICE>
         <CHOICE>(2) Normal</CHOICE>
         <CHOICE>(3) Low</CHOICE>
      </CHOICES>
      <Default>(2) Normal</Default>
   </Field>
   <Field Type="Choice" Name="Status" DisplayName="Status">
      <CHOICES>
         <CHOICE>Not Started</CHOICE>
         <CHOICE>In Progress</CHOICE>
         <CHOICE>Completed</CHOICE>
         <CHOICE>Deferred</CHOICE>
         <CHOICE>Waiting on someone else</CHOICE>
      </CHOICES>
      <Default>Not Started</Default>
   </Field>
   <Field Type="Number" Name="PercentComplete" Percentage="TRUE" 
         Min="0" Max="1" DisplayName="% Complete"></Field>
   <Field Type="User" List="UserInfo" Name="AssignedTo" 
         DisplayName="Assigned To"></Field>
   <Field Type="Note" RichText="TRUE" Name="Body" 
         DisplayName="Description" Sortable="FALSE"></Field>
   <Field Type="DateTime" Name="StartDate" DisplayName="Start Date">
      <Default>[today]</Default>
   </Field>
   <Field Type="DateTime" Name="DueDate" 
         DisplayName="Due Date"></Field>
</Fields>
Show:
© 2015 Microsoft