FilterDefinition Element (AlertTemplates)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements

Defines an alert template filter. To modify existing filters or create additional filters, modify the FilterDefinition element of the appropriate template. Define the Query element inside the filter by using Collaborative Application Markup Language (CAML).


<FilterDefinition>
  <FriendlyName>
  </FriendlyName>  <ShortName>
  </ShortName>
  <Query>
    <GroupBy>
      ...
    </GroupBy>
    <OrderBy>
      ...
    </OrderBy>
  </Query>
</FilterDefinition>

The following query creates an alert event if the event date, end date, or location changes.

<FilterDefinition>
  <FriendlyName>$Resources:Alerts_4_filter;</FriendlyName>
  <ShortName>$Resources:Alerts_4_filter_shortname;</ShortName>
  <Query>
  <Or>
    <Or>
      <Neq><FieldRef name="EventDate/New"/>
        <FieldRef name="EventDate/Old"/>
      </Neq>
      <Neq>
        <FieldRef name="EndDate/New"/>
        <FieldRef name="EndDate/Old"/>
      </Neq>
    </Or>
      <Neq>
        <FieldRef name="Location/New"/>
        <FieldRef name="Location/Old"/>
      </Neq>
    </Or>
  </Query>
</FilterDefinition>

Show:
© 2014 Microsoft