Then element (View)

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

Contains what is rendered in an IfEqual or IfNew element, based on whether the contents of the Expr1 and Expr2 elements are equal or new, respectively.

<Then>
</Then>

Elements and attributes

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

Attributes

None

Child elements

Numerous

Parent elements

Occurrences

  • Minimum: 0
  • Maximum: 1

Example

The following example uses the IfEqual element to render either the Then element or the Else element, based on whether the contents of the Expr1 and Expr2 elements are equal.

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

See also