cfexchangefilter
Description
Specifies filter parameters that control the actions of cfexchangemail, cfexchangecalendar, cfexchangetask, and cfexchangecontact, get operations.
Categories
Related
History
ColdFusion
8: Added this tag.
Syntax
<cfexchangefilter
name = "filter type"
value = "filter value">
OR
<cfexchangefilter
name = "filter type"
from = "date/time"
to = "date/time">
Note: You
can specify this tag’s attributes in an attributeCollection attribute
whose value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute names as structure keys.
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| actualWork | value | ||
| allDayEvent | value | ||
| assistant | A string. | ||
| bcc | value | ||
| billingInfo | value | ||
| businessAddress | A structure with the following fields: Street, City, State, Zip, Country. | ||
| businessFax | A string. | ||
| businessPhoneNumber | A string. | ||
| categories | A comma-delimited list of categories. The filter searches for contacts that match all the categories in the list. | ||
| cc | value | ||
| companies | value | ||
| company | A string. | ||
| dateCompleted | value | ||
| description | A string. | ||
| displayAs | A string. | ||
| dueDate | from to | ||
| duration | value | ||
| email1 | A string. | ||
| email2 | A string. | ||
| email3 | A string. | ||
| endTime | from to | ||
| firstName | A string. | ||
| folder | value | ||
| from | The start date or date/time combination of the range to use for filtering. Cannot be used with the value attribute. If you specify a from attribute without a to attribute, the filter selects for all entries on or after the specified date or time. The value can be in any date/time format recognized by ColdFusion, but must correspond to a value that is appropriate for the filter type. | Optional | |
| fromID | value | ||
| fromID | value | ||
| hasAttachment | value | ||
| hasAttachment | A Boolean value. | ||
| hasAttachment | value | ||
| homeAddress | A structure with the following fields: Street, City, State, Zip, Country. | ||
| homePhoneNumber | A string. | ||
| importance | value | ||
| importance | value | ||
| isRead | value | ||
| isRecurring | value | ||
| jobTitle | A string. | ||
| lastName | A string. | ||
| location | value | ||
| mail_ID | value | ||
| mailingAddressType | One of the following values: Home, Business, Other. | ||
| manager | A string. | ||
| maxRows | value | ||
| maxRows | A positive integer that specifies the maximum number of matching rows to return. By default, the maximum number of rows is 100. You can also specify -1; to return all matching rows. | ||
| maxRows | value | ||
| maxRows | value | ||
| MeetingUID | value | ||
| message | value | ||
| message | value | ||
| message | value | ||
| MessageType | value | ||
| middleName | A string. | ||
| mileage | value | ||
| mobilePhoneNumber | A string. | ||
| name | The type of filter to use. | Required | |
| nickName | A string. | ||
| office | A string. | ||
| optionalAttendees | value | ||
| organizer | value | ||
| otherAddress | A structure with the following fields: Street, City, State, Zip, Country. | ||
| otherPhoneNumber | A string. | ||
| pager | A string. | ||
| percentCompleted | value | ||
| priority | value | ||
| profession | A string. | ||
| reminderDate | value | ||
| requiredAttendees | value | ||
| sensitivity | value | ||
| sensitivity | value | ||
| spouseName | A string. | ||
| startDate | from to | ||
| startTime | from to | ||
| status | value | ||
| subject | value | ||
| subject | value | ||
| subject | value | ||
| timeReceived | from to | ||
| timeSent | from to | ||
| to | The end date or date/time combination for the range used for filtering. Cannot be used with the value attribute. If you specify a to attribute without a from attribute, the filter selects for all entries on or before the specified date or time. The value can be in any date/time format recognized by ColdFusion, but must correspond to a value that is appropriate for the filter type. | Optional | |
| toID | value | ||
| totalWork | value | ||
| UID | value | ||
| uid | value | ||
| UID | value | ||
| value | The filter value for all filters that do not take a date or time range. Cannot be used with the from and to attributes. ColdFusion generates an error if you specify this attribute with an empty contents. Therefore, you cannot use the empty string to search for empty values. If you set this attribute to the empty string (""), ColdFusion searches for entries where the specified field is empty. 6.07 | Optional | |
| webPage | A string. |
Usage
The cfexchangefilter tag specifies the conditions to match when ColdFusion gets mail messages, calendar entries, tasks, or contacts. Only those entries that match the specified filter conditions are returned in the structure specified by the parent tag’s name attribute. If the filter specifies a field that takes a text string, such as Message and or Subject, ColdFusion returns items that contain the exact phrase that you specify in the value attribute.
The cfexchangefilter tag must be a child tag of a cfexchangecalendar, cfexchangecontact, cfexchangemail, or cfexchangetask tag with an action attribute value of get.
If you specify multiple cfexchangefilter tags in the body of a ColdFusion exchange tag, such as cfexchangemail, the specified filters are cumulative, and the selected records match the conditions specified in all the cfexchangefilter tags. If you specify multiple cfexchangefilter tags with the same name attribute value, the last tag with that attribute specifies the filter conditions.
The cfexchangefilter tag must be a child tag of a cfexchangecalendar, cfexchangecontact, cfexchangemail, or cfexchangetask tag with an action attribute value of get.
If you specify multiple cfexchangefilter tags in the body of a ColdFusion exchange tag, such as cfexchangemail, the specified filters are cumulative, and the selected records match the conditions specified in all the cfexchangefilter tags. If you specify multiple cfexchangefilter tags with the same name attribute value, the last tag with that attribute specifies the filter conditions.
Example
The
following example gets the mail messages that were sent to a user
during the last week from any e-mail address that includes adobe.com.
To focus on getting messages, rather than on displaying data, the
example uses the cfdump tag to show the results.
<cfset endTime = Now()>
<cfset startTime = DateAdd("d","-7", endTime)>
<cfexchangemail action="get" name="weeksMail" server="#exchangeServerIP#"
username ="#user1#" password="#password1#">
<cfexchangefilter name="FromID" value="adobe.com">
<cfexchangefilter name="TimeSent" from="#startTime#" to="#endTime#">
</cfexchangemail>
<cfdump var="#weeksMail#">