Skip to main content

TcxFilterOperatorKind Enum

Enumerates filter condition operators.

Declaration

TcxFilterOperatorKind = (
    foEqual,
    foNotEqual,
    foLess,
    foLessEqual,
    foGreater,
    foGreaterEqual,
    foLike,
    foNotLike,
    foBetween,
    foNotBetween,
    foInList,
    foNotInList,
    foYesterday,
    foToday,
    foTomorrow,
    foLast7Days,
    foLastWeek,
    foLast14Days,
    foLastTwoWeeks,
    foLast30Days,
    foLastMonth,
    foLastYear,
    foInPast,
    foThisWeek,
    foThisMonth,
    foThisYear,
    foNext7Days,
    foNextWeek,
    foNext14Days,
    foNextTwoWeeks,
    foNext30Days,
    foNextMonth,
    foNextYear,
    foInFuture,
    foContains,
    foNotContains,
    foBeginsWith,
    foEndsWith
);

Members

Name
foEqual
foNotEqual
foLess
foLessEqual
foGreater
foGreaterEqual
foLike
foNotLike
foBetween
foNotBetween
foInList
foNotInList
foYesterday
foToday
foTomorrow
foLast7Days
foLastWeek
foLast14Days
foLastTwoWeeks
foLast30Days
foLastMonth
foLastYear
foInPast
foThisWeek
foThisMonth
foThisYear
foNext7Days
foNextWeek
foNext14Days
foNextTwoWeeks
foNext30Days
foNextMonth
foNextYear
foInFuture
foContains
foNotContains
foBeginsWith
foEndsWith

Remarks

This type enumerates operators used in a simple filter condition of the TcxFilterCriteriaItem class. A simple filter condition consists of a single comparison operation. The operator for the comparison operation is provided by the TcxFilterCriteriaItem.OperatorKind property. The item values are compared according to the TcxFilterCriteriaItem.Value property.

Comparison operators check whether two expressions match. The following table lists possible operators:

Value

Description

foEqual

The = operator

Equal to

Example

foNotEqual

The <> operator

Not equal to

foLess

The < operator

Less than

foLessEqual

The <= operator

Less than or equal to

foGreater

The > operator

Greater than

foGreaterEqual

The >= operator

Greater than or equal to

foLike

The LIKE operator

TRUE if the operand matches a pattern.

With the LIKE operator you can use ‘%’ and ‘‘ wildcards. The ‘%’ wildcard substitutes any number of characters. The ‘‘ character is used to represent any single character. You can assign another characters to be used as wildcards via the TcxFilterCriteria.PercentWildcard and TcxFilterCriteria.UnderscoreWildcard properties.

For instance, the operator “LIKE ‘Mc%’ “ returns true for all strings that begin with the letters ‘Mc’ and contain any number of characters.

foNotLike

The ‘NOT LIKE’ operator

TRUE if the operand does not match a pattern.

See the description of the foLike value.

foBetween

The BETWEEN operator

TRUE if the operand is between two inclusive values. These values are specified as an array of variants using the TcxFilterCriteriaItem.Value property.

To create the variant array, you can use the VarBetweenArrayCreate function (declared in the cxVariants unit) or the standard VarArrayCreate function.

Example

foNotBetween

The negation of the BETWEEN operator

TRUE if the operand does not belong to a range. The bounds of the range are specified by the TcxFilterCriteriaItem.Value property. It holds an array of variants. To create an array of variants for the foNotBetween operator (as well as for foBetween), see the VarBetweenArrayCreate function (declared in the cxVariants unit) or the standard VarArrayCreate function.

Refer to the example provided for the foBetween operator.

foInList

The IN (also called ‘membership test’) operator

TRUE if the operand is in the value list provided by the TcxFilterCriteriaItem.Value property. To create a list of values, see the VarArrayCreate function, for instance.

Example

foNotInList

The negation of the foInList operator

TRUE if the operand is not a member of the value list provided by the TcxFilterCriteriaItem.Value property. To create a list of values, see the VarArrayCreate function, for instance.

Refer to the example provided for the foNotInList operator.

foYesterday

Applies to date values.

TRUE if the operand is equal to yesterday’s date.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

Example

foToday

Applies to date values.

TRUE if the operand is equal to the current date.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foTomorrow

Applies to date values.

TRUE if the operand is equal to tomorrow’s date.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLast7Days

Applies to date values.

TRUE if the operand falls within the last seven days. By default, today’s date is included into the range as specified by the cxFilterIncludeTodayInLastNextDaysList global variable.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLastWeek

Applies to date values.

TRUE if the operand falls within the previous week.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLast14Days

Applies to date values.

TRUE if the operand falls within the last fourteen days. By default, today’s date is included into the range as specified by the cxFilterIncludeTodayInLastNextDaysList global variable.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLastTwoWeeks

Applies to date values.

TRUE if the operand falls within the previous two weeks.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLast30Days

Applies to date values.

TRUE if the operand falls within the last thirty days. By default, today’s date is included into the range as specified by the cxFilterIncludeTodayInLastNextDaysList global variable.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLastMonth

Applies to date values.

TRUE if the operand falls within the previous month.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foLastYear

Applies to date values.

TRUE if the operand falls within the previous year.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foInPast

Applies to date values.

TRUE if the operand falls within the past dates.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foThisWeek

Applies to date values.

TRUE if the operand falls within the current week.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foThisMonth

Applies to date values.

TRUE if the operand falls within the current month.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foThisYear

Applies to date values.

TRUE if the operand falls within the current year.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNext7Days

Applies to date values.

TRUE if the operand falls within the next seven days. By default, today’s date is included into the range as specified by the cxFilterIncludeTodayInLastNextDaysList global variable.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNextWeek

Applies to date values.

TRUE if the operand falls within the next week.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNext14Days

Applies to date values.

TRUE if the operand falls within the next fourteen days. By default, today’s date is included into the range as specified by the cxFilterIncludeTodayInLastNextDaysList global variable.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNextTwoWeeks

Applies to date values.

TRUE if the operand falls within the next two weeks.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNext30Days

Applies to date values.

TRUE if the operand falls within the next thirty days. By default, today’s date is included into the range as specified by the cxFilterIncludeTodayInLastNextDaysList global variable.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNextMonth

Applies to date values.

TRUE if the operand falls within the next month.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foNextYear

Applies to date values.

TRUE if the operand falls within the next year.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foInFuture

Applies to date values.

TRUE if the operand falls within the future dates.

The value and display text provided by the TcxFilterCriteriaItem.Value and TcxFilterCriteriaItem.DisplayValue properties respectively are ignored.

foContains

The CONTAINS operator

Applies to string values

TRUE if the operand contains a specified substring.

The wildcards specified by the TcxFilterCriteria.PercentWildcard and TcxFilterCriteria.UnderscoreWildcard properties are considered meaningful characters in the substring.

foNotContains

The ‘NOT CONTAINS’ operator

Applies to string values

TRUE if the operand doesn’t contain a specified substring.

The wildcards specified by the TcxFilterCriteria.PercentWildcard and TcxFilterCriteria.UnderscoreWildcard properties are considered meaningful characters in the substring.

foBeginsWith

The ‘BEGINS WITH’ operator

Applies to string values

TRUE if the operand begins with a specified substring.

The wildcards specified by the TcxFilterCriteria.PercentWildcard and TcxFilterCriteria.UnderscoreWildcard properties are considered meaningful characters in the substring.

foEndsWith

The ‘ENDS WITH’ operator

Applies to string values

TRUE if the operand ends with a specified substring.

The wildcards specified by the TcxFilterCriteria.PercentWildcard and TcxFilterCriteria.UnderscoreWildcard properties are considered meaningful characters in the substring.

See Also