Expr2 element (View)

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

Used as part of a comparison with the value contained in an Expr1 element. The Expr2 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.


Elements and attributes

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



Child elements

Parent elements


  • Minimum: 0
  • Maximum: 1


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

  <Then>Happy Halloween!</Then>
  <Else>Just another day</Else>

See also