0 out of 7 rated this helpful - Rate this topic

Value Element (Query)

Windows SharePoint Services 3

Contains the value against which the value returned by the FieldRef element is compared.


<Value
  Type = "Text"
  IncludeTimeValue = "TRUE" | "FALSE>
</Value>
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.

Numerous

Minimum: 0

Maximum: 1

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>
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
DateTime format
DateTime format must be ISO8061.
The Value Element Types can be found in the SPFieldType Enumeration
Use attribute IncludeTimeValue when comparing times
There is at least one attribute not mentioned here! If you're comparing DateTime values, and want the comparison to take the time portion into account instead of just the date, use IncludeTimeValue='True' in the Value element.
Poor documentation on the possible Values
Values are only text? if it is a datetime type which format can use? if it is text, can I use wildcards? what about case sensitivness or accent sensitivness options?