다음을 통해 공유


Gt Element (Query)

Applies to: SharePoint Foundation 2010

Arithmetic operator that means "greater than." This element is used similarly to the Eq and Lt elements.

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

Attributes

Attribute

Description

None

N/A

Child Elements

FieldRef, Value, XML

Parent Elements

And, Or, Where

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

Remember that Collaborative Application Markup Language (CAML) is case-sensitive; note the lowercase "t" in the Gt element name.

Example

The following example queries for cases where the Deadline field value either equals an empty string or is later than the current date.

<Query>
  <Where>
    <Or>
      <IsNull>
        <FieldRef Name="Deadline" />
      </IsNull>
      <Gt>
        <FieldRef Name="Deadline" />
        <Value Type="DateTime">
          <Today />
        </Value>
      </Gt>
    </Or>
  </Where>
  <OrderBy>
    <FieldRef Name="Modified" Ascending="FALSE" />
  </OrderBy>
</Query>

See Also

Reference

Eq Element (Query)

Geq Element (Query)

Lt Element (Query)

Neq Element (Query)