This topic has not yet been rated Rate this topic

Value Element (Query)

Published: May 2010

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.

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>

Date

Description

Reason

May 2010

Initial publication

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ
Multiple sources of inadequate documentation does not count as documentation
How is that assumption working out for you? Our IT department most certainly does not give us access to ANY SharePoint servers. So I have to use SP Designer, and the ajaxian web-services to do my job. Which means that this documentation is all I have to go on. And it is VERY sparse documentation in the way of giving me information like that below. I would try to read the schema file documentation, but this is what I get http://msdn.microsoft.com/en-us/library/dd950701(v=office.12).aspx
Valid type attribute values
I assume the valid values for the type attribute are the values of the SPFieldType enumeration: