Expr element (View)

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

Contains a CAML expression that is evaluated to determine the course of action for a Switch or FieldSwitch statement. 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 checks the value of a UserID field and returns "User Zero" if the value is 0 (zero). Otherwise, it sets a default value: "Not User Zero".

  <Case Value="0">User Zero</Case>
  <Default>Not User Zero</Default>

See also