FilterDefinition Element (AlertTemplates)

Applies to: SharePoint Foundation 2010

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>

Attributes

None

Child Elements

FriendlyName

ShortName

Query

Parent Elements

Filters

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>