Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (53 sloc) 2.01 KB
title manager ms.date ms.audience ms.topic ms.prod localization_priority api_name api_type ms.assetid description
ViewFields element (List)
soliver
3/9/2015
Developer
reference
office-online-server
Normal
List schema
schema
488d22b5-b3e0-465c-a56a-1a38afb15db5
Provides an enumeration of the fields in a view through a listing of the FieldRef elements.

ViewFields element (List)

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>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

None

Child elements

Parent elements

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.

ViewFields can include references to fields in a foreign list, if there is a join defined by a Join element.

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

You can’t perform that action at this time.