Expr1 element (View)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Used within as part of a comparison with the value contained in an Expr2 element. The Expr1 element contains the CAML expression that is evaluated to determine the course of action. The expressions can be any set of CAML elements that render text, or they can be other conditionals.

<Expr1>
</Expr1>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

None

Child elements

Parent elements

Occurrences

  • Minimum: 0
  • Maximum: 1

Example

The following example evaluates two expressions, and if they are equal, it conveys a holiday greeting, but if not, it conveys a different message.

<IfEqual>
  <Expr1><Today/></Expr1>
  <Expr2>10/31/2000</Expr2>
  <Then>Happy Halloween!</Then>
  <Else>Just another day</Else>
</IfEqual>

See also