AddCriterion method

Adds a filter criterion to be used by the query to retrieve data from a database page.

Syntax


C++

HRESULT AddCriterion (
   LONG ColumnID,
   ERUFilterOperator Operator)
   Variant Value1,
   Variant Value2,

Scripting languages

Value = Object.AddCriterion (
   ColumnID as Long,
   Operator as ERUFilterOperator)
   Value1 as Variant,
   Value2 as Variant,

Parameters


ColumnID

The ID of the column to which the filter criterion applies.

Operator

The operator for the filter criterion. (See ERUFilterOperator and the Legal Values below.)

Value1

The first value for the filter criterion.

Value2

The value of the second argument used by the operator.
If the operator requires only one argument, it is safe to pass an empty VARIANT.

Return value


C++

None.

Scripting languages

None.

Legal values


erDBFilterKeywordAny

Use this value to match rows where the choice list filter column contains any keyword.

erDBFilterKeywordAll

Use this value to match rows where the choice list filter column contains all keywords defined for that column.

erDBFilterKeywordAnyInList

Given a list of keywords, match rows where the choice list filter column contains a keyword from the list.

erDBFilterKeywordAllInList

Given a list of keywords, match rows where the choice list filter column contains all the keywords in the list.

erDBFilterStringEqual

Value1 should contain a string. Value2 is not used. If the caller wants to filter on the specific column, then pass the column ID. If the caller wants to use the generic text filter, then pass -1 as the column ID. The value of -1 represents no column.

erDBFilterNumberEqual, erDBFilterNumberNotEqual, erDBFilterNumberGreaterThan, erDBFilterNumberGreaterEqual, erDBFilterNumberLessThan, erDBFilterNumberLessEqual

Value1 should contain a number. Value2 is not used.

erDBFilterDateOn, erDBFilterDateBefore, erDBFilterDateAfter, erDBFilterDateBetween

Value1 should contain a DATE. Value2 should also contain a DATE for operator erDBFilterDateBetween, otherwise it's not used.

erDBFilterBoolYes, erDBFilterBoolNo, erDBFilterBoolUnset

Only operator is enough to describe the filter, both Value1 and Value2 are not used.

erDBFilterKeywordEqual

Value1 should contain a string. Value2 is not used.

erDBFilterKeywordUnset

Only operator is enough to describe the filter, both Value1 and Value2 are not used.

erDBFilterMemberAnyMember, erDBFilterMemberNotAnyMember

Value1 should contain a IERUMemberSet. Value2 is ignored.

erDBFilterMemberApproved, erDBFilterMemberNotApproved, erDBFilterMemberNoMembers

Only operator is enough to describe the filter, both Value1 and Value2 are not used.

erDBFilterTrafficEqual

Value1 should contain a value in ERUTrafficLightColor. Use erDBFilterTrafficUnset to determine if value is not set. Value2 is ignored.

erDBFilterTrafficUnset

Only operator is enough to describe the filter, both Value1 and Value2 are not used.

erDBFilterHistoryDateAny

Value1 is ignored. Value2 contains a IERUMemberSet which contains only one member.

erDBFilterHistoryDateOn, erDBFilterHistoryDateBefore, erDBFilterHistoryDateSince

Value1 contains a DATE. Value2 is optional, it could contain a IERUMemberSet which contains only one member.

 

Home

Applies to

IERUDBQuery