Value element (Query)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Contains the value against which the value returned by the FieldRef element is compared.
<Value
Type = "Text"
IncludeTimeValue = "TRUE" | "FALSE">
</Value>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Description |
---|---|
Type |
Required Text. Specifies the data type for the value contained by this element. |
IncludeTimeValue |
Optional Boolean. Specifies to build DateTime queries based on time as well as date. If you do not set this attribute, the time portion of queries that involve date and time are ignored. |
Child elements
Parent elements
- BeginsWith
- Contains
- DateRangesOverlap
- Eq
- Geq
- Gt
- Includes
- IsNotNull
- IsNull
- Leq
- Lt
- Neq
- NotIncludes
- Values
Occurrences
- Minimum: 0
- Maximum: 1
Example
In the following example, the query returns cases where the BaseType field equals 1, and the Project field equals the ID of the current project property. Results are returned in ascending order, first by Title and then by ID.
<Query>
<Where>
<And>
<Eq>
<FieldRef Name="BaseType" />
<Value Type="Integer">1</Value>
</Eq>
<Eq>
<FieldRef Name="Project" />
<Value Type="Integer">
<ProjectProperty Select="ID" />
</Value>
</Eq>
</And>
</Where>
<OrderBy>
<FieldRef Name="Title" />
<FieldRef Name="ID" />
</OrderBy>
</Query>