Specifies filter parameters that control the actions of cfexchangemail, cfexchangecalendar, cfexchangetask, and cfexchangecontact, get operations.
ColdFusion 8: Added this tag.
<cfexchangefilter name = "filter type
" value = "filter value
"> OR <cfexchangefilter name = "filter type
" from = "date/time
" to = "date/time
">
cfexchangecalendar, cfexchangeconnection, cfexchangecontact, cfexchangemail, cfexchangetask, "Getting Exchange items and attachments" in the ColdFusion Developer's Guide
Attribute |
Req/Opt |
Default |
Description |
---|---|---|---|
name |
Required |
|
The type of filter to use. |
from |
Optional |
|
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. |
to |
Optional |
|
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. |
value |
Optional |
|
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.
|
The cfexchangeCalendar tag filters can have the following name attributes and associated value, or to and from attributes that you use to specify the filter parameters for the specified action:
name attribute |
Specification attributes |
Valid specification attribute values |
---|---|---|
maxRows |
value |
A positive integer specifying the maximum number of matching rows to return. By default, the maximum number of rows is 100. |
allDayEvent |
value |
A Boolean value. |
duration |
value |
An integer number of minutes. |
endTime |
from to |
A string that ColdFusion can interpret as a date-time value. |
fromID |
value |
An Exchange user ID. |
hasAttachment |
value |
A Boolean value. |
importance |
value |
One of the following values:
|
isRecurring |
value |
A Boolean value. |
location |
value |
A string. |
message |
value |
A string. |
optionalAttendees |
value |
A comma-delimited list of Exchange user IDs. |
organizer |
value |
A string that identifies the organizer. This value does not need to be an Exchange ID or e-mail address. |
requiredAttendees |
value |
A comma-delimited list of Exchange user IDs. |
sensitivity |
value |
One of the following values:
|
startTime |
from to |
A string that ColdFusion can interpret as a date-time value. |
subject |
value |
A string. |
UID |
value |
A case-sensitive Exchange message UID that uniquely identifies one message. |
The cfexchangecontact tag filters can have the following name attributes and associated value attributes. Unlike other tags, you do not use from or to attributes.
name attribute |
value attribute |
---|---|
maxRows |
A positive integer that specifies the maximum number of matching rows to return. By default, the maximum number of rows is 100. |
assistant |
A string. |
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. |
company |
A string. |
description |
A string. |
displayAs |
A string. |
email1 |
A string. |
email2 |
A string. |
email3 |
A string. |
firstName |
A string. |
hasAttachment |
A Boolean value. |
homeAddress |
A structure with the following fields: Street, City, State, Zip, Country. |
homePhoneNumber |
A string. |
jobTitle |
A string. |
lastName |
A string. |
mailingAddressType |
One of the following values: Home, Business, Other. |
manager |
A string. |
middleName |
A string. |
mobilePhoneNumber |
A string. |
nickName |
A string. |
office |
A string. |
otherAddress |
A structure with the following fields: Street, City, State, Zip, Country. |
otherPhoneNumber |
A string. |
pager |
A string. |
profession |
A string. |
spouseName |
A string. |
webPage |
A string. |
The cfexchangemail tag filters can have the following name attributes and associated value, or to and from attributes that you use to specify the filter parameters for the specified action:
name attribute |
Specification attributes |
Specification attribute values |
---|---|---|
maxRows |
value |
A positive integer that specifies the maximum number of matching rows to return. By default, the maximum number of rows is 100. |
bcc |
value |
A comma-delimited list of Exchange or web e-mail addresses. |
cc |
value |
A comma-delimited list of Exchange or web e-mail addresses. |
folder |
value |
The forward slash (/) delimited path from the root of the Exchange mailbox to the folder to search. By default, the filter searches the top level of the Inbox. The cfexchangemail tag searches only the specified folder, and does not search any subfolders. If a folder name contains a forward slash, use the _xF8FF_ escape sequence to specify the character in the name. For the get and move actions, you can use the cfexchangemail tag folder attribute instead of this field; however, this field takes precedence over the value specified in the folder attribute. |
fromID |
value |
An Exchange or web e-mail address. |
hasAttachment |
value |
A Boolean value |
importance |
value |
One of the following values:
|
isRead |
value |
A Boolean value. |
message |
value |
A string. |
MessageType |
value |
One of the following values: Mail, Meeting, Meeting_Cancel, Meeting_Request, Meeting_Response, or All. If you omit this attribute, the filter gets messages of all types. The Meeting attribute gets messages with Meeting_Cancel, Meeting_Request, and Meeting_Response types. |
MeetingUID |
value |
A case-sensitive Exchange calendar event UID. Meeting UIDs are used in Meeting_request or Meeting_response message types only. Do not specify this field if you specify a MessageType field value of Mail. |
sensitivity |
value |
One of the following values:
|
subject |
value |
A string. |
timeReceived |
from to |
A string that ColdFusion can interpret as a date-time value. |
timeSent |
from to |
A string that ColdFusion can interpret as a date-time value. |
toID |
value |
A comma-delimited list of Exchange or web e-mail addresses. |
uid |
value |
A case-sensitive Exchange message UID. |
The cfexchangetask tag filters can have the following name attributes and associated value, or to and from attributes that you use to specify the filter parameters for the specified action:
name attribute |
Specification attributes |
Specification attribute values |
---|---|---|
maxRows |
value |
A positive integer specifying the maximum number of matching rows to return. By default, the maximum number of rows is 100. |
actualWork |
value |
A number representing the number of hours. Use decimal numbers to specify minutes. |
billingInfo |
value |
A string. |
companies |
value |
A string. |
dateCompleted |
value |
A string that ColdFusion can interpret as a date-time value. |
dueDate |
from to |
A string that ColdFusion can interpret as a date-time value. |
mail_ID |
value |
A comma-delimited list of Exchange mail IDs. This filter value is useful if the connection user has delegate rights for multiple users and you want to select the tasks of a limited number of those users. |
message |
value |
A string. |
mileage |
value |
A string. |
percentCompleted |
value |
A number between 0 and 100. |
priority |
value |
One of the following values:
|
reminderDate |
value |
A string that ColdFusion can interpret as a date-time value. |
startDate |
from to |
A string that ColdFusion can interpret as a date-time value. |
status |
value |
Must be one of the following values:
|
subject |
value |
A string. |
totalWork |
value |
A number that represents the number of hours. Use decimal numbers to specify minutes. |
UID |
value |
A case-sensitive Exchange UID. |
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 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#">