Views element (List)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Contains an enumeration of the views that are used in a list.


Elements and attributes

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



Child elements

Parent elements


  • Minimum: 0
  • Maximum: 1


The following example illustrates a collection of View elements contained by a Views element. The first view, "Summary," displays a sequence of paragraphs. The Query element specifies not only a sort order (in order of modification date), but also a filter (only show items whose Expires property is greater than or equal to today's date).

  <View Type="HTML" Name="Summary">
    <ViewBody ExpandXML="TRUE">
      <![CDATA[ <p><SPAN class=DocTitle>
            <ows:Field Name="Title"/></SPAN>
        (<ows:Field Name="Author"/>, <ows:Field Name="Modified"/>)
        <ows:Limit><Field Name="Body"/></ows:Limit>
        </p>  ]]>
          <FieldRef Name="Expires"/>
          <Value Type="DateTime">
        <FieldRef Name="Modified"/>
      <FieldRef Name="Summary"/>
      <FieldRef Name="Author"/>
      <FieldRef Name="Modified"/>
      <FieldRef Name="Body"/>
  <View Type="HTML" Name="Titles">
  <View Type="HTML" Name="Dates">

See also