Share via


ViewFields Element (View)

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.

Provides an enumeration of the fields in a view through a listing of the FieldRef elements.

<ViewFields>
</ViewFields>

Attributes

Attribute

Description

None

N/A

Child Elements

FieldRef

Parent Elements

View, ViewStyle

Occurrences

Minimum: 0

Maximum: 1

Remarks

For a FieldRef element to be used within a ViewBody element, it must also be included in the ViewFields element to ensure that the field is 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

Reference

ViewBidiHeader Element (View)

ViewBody Element (View)

ViewEmpty Element (View)

ViewFooter Element (View)

ViewHeader Element (View)