Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Provides an enumeration of the fields in a view through a listing of the FieldRef elements.
<ViewFields>
</ViewFields>
The following sections describe attributes, child elements, and parent elements.
None
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.
ViewFields can include references to fields in a foreign list, if there is a join defined by a Join element.
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>
Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn more