FilterDefinition element (AlertTemplates)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
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>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
Attributes
None
Child elements
Parent elements
Example
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>