다음을 통해 공유


IsNotNull Element (Query)

Applies to: SharePoint Foundation 2010

Used within a query to return items that are not empty (Null).

<IsNotNull>
  <FieldRef Name = "Field_Name"/>
  <Value Type = "Field_Type"/>
  <XML />
</IsNotNull>

Attributes

Attribute

Description

None

N/A

Child Elements

FieldRef, Value, XML

Parent Elements

And, Or, Where

Occurrences

Minimum: 0

Maximum: Unbounded

Example

The following query returns cases where the field base type is 1, the ID field equals the Project column, and the Template column is not empty. Results are returned in ascending order by Title and then by ID.

<Query>
  <Where>
    <And>
      <And>
        <Eq>
          <FieldRef Name="BaseType"></FieldRef>
          <Value Type="Integer">1</Value>
        </Eq>
        <Eq>
          <FieldRef Name="Project"></FieldRef>
          <Value Type="Integer">
            <ProjectProperty Select="ID"></ProjectProperty>
          </Value>
        </Eq>
      </And>
      <IsNotNull>
        <FieldRef Name="Template"></FieldRef>
      </IsNotNull>
    </And>
  </Where>
  <OrderBy>
    <FieldRef Name="Title"></FieldRef>
    <FieldRef Name="ID"></FieldRef>
  </OrderBy>
</Query>

See Also

Reference

IsNull Element (Query)

Where Element (Query)