다음을 통해 공유


Lt Element (Query)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Arithmetic operator that means "less than" and is used in queries in views. This element is used similarly to the Eq and Gt elements.

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

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 Lt element name.

Example

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

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

See Also

Reference

Eq Element (Query)

Geq Element (Query)

Gt Element (Query)

Neq Element (Query)