IfEqual element (View)

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

Allows for conditional rendering based on the comparison of two Collaborative Application Markup Language (CAML) expressions.


Elements and attributes

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



Child elements

Parent elements



The following example uses the IfEqual element to define the display pattern for the Checked Out To column. If the user ID equals null, nothing is displayed. If the user ID does not equal null, a link is provided to a display form with information about the user.

         <Field Name="CheckedOutUserId" />
      <Expr2 />
      <Then />
         <HTML><![CDATA[ <a href="]]></HTML>
            <![CDATA[ /_layouts/[%=System.Threading.Thread.
         <Field Name="CheckedOutUserId" />
         <HTML><![CDATA[ ">]]></HTML>
         <Field HTMLEncode="TRUE" Name="CheckedOutTitle" />
         <HTML><![CDATA[ </a>]]></HTML>

See also