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

AttributeDescriptionRequiredDefault
actualWorkvalue
allDayEventvalue
assistantA string.
bccvalue
billingInfovalue
businessAddressA structure with the following fields: Street, City, State, Zip, Country.
businessFaxA string.
businessPhoneNumberA string.
categoriesA comma-delimited list of categories. The filter searches for contacts that match all the categories in the list.
ccvalue
companiesvalue
companyA string.
dateCompletedvalue
descriptionA string.
displayAsA string.
dueDatefrom to
durationvalue
email1A string.
email2A string.
email3A string.
endTimefrom to
firstNameA string.
foldervalue
fromThe 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
fromIDvalue
fromIDvalue
hasAttachmentvalue
hasAttachmentA Boolean value.
hasAttachmentvalue
homeAddressA structure with the following fields: Street, City, State, Zip, Country.
homePhoneNumberA string.
importancevalue
importancevalue
isReadvalue
isRecurringvalue
jobTitleA string.
lastNameA string.
locationvalue
mail_IDvalue
mailingAddressTypeOne of the following values: Home, Business, Other.
managerA string.
maxRowsvalue
maxRowsA 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.
maxRowsvalue
maxRowsvalue
MeetingUIDvalue
messagevalue
messagevalue
messagevalue
MessageTypevalue
middleNameA string.
mileagevalue
mobilePhoneNumberA string.
nameThe type of filter to use.Required
nickNameA string.
officeA string.
optionalAttendeesvalue
organizervalue
otherAddressA structure with the following fields: Street, City, State, Zip, Country.
otherPhoneNumberA string.
pagerA string.
percentCompletedvalue
priorityvalue
professionA string.
reminderDatevalue
requiredAttendeesvalue
sensitivityvalue
sensitivityvalue
spouseNameA string.
startDatefrom to
startTimefrom to
statusvalue
subjectvalue
subjectvalue
subjectvalue
timeReceivedfrom to
timeSentfrom to
toThe 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
toIDvalue
totalWorkvalue
UIDvalue
uidvalue
UIDvalue
valueThe 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.07Optional
webPageA 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.

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#">