Share via


ViewFields Element

The ViewFields element provides an enumeration of the fields in a view through a listing of the FieldRef elements.

Syntax

<ViewFields>
</ViewFields>
Parent Elements Child Elements
View FieldRef

Remarks

For a FieldRef element to be used in the ViewBody field, it must be included in the ViewFields element to ensure that it's available in the database result set.

The SQL SELECT clause is generated from the collection of FieldRef listings.

Example

The following example enumerates the collection of fields used in a view.

<ViewFields>
  <FieldRef Name="LinkTitle"></FieldRef>
  <FieldRef Name="AssignedTo"></FieldRef>
  <FieldRef Name="Status"></FieldRef>
  <FieldRef Name="Priority"></FieldRef>
  <FieldRef Name="DueDate"></FieldRef>
  <FieldRef Name="PercentComplete"></FieldRef>
</ViewFields>

See Also

ViewBody

ViewEmpty

ViewHeader