TTMSFNCFilterRulesManager.EnableWhere Method
Upserts an enable rule that sets Enabled=True on match and Enabled=False on no-match; applies immediately when AApply is True (default).
API unit family: TMS.TMSFNCFilterRulesManager
Declaring type: TTMSFNCFilterRulesManager
Inherited from: TTMSFNCCustomFilterRulesManager
Overloads
Overload 1
Upserts an enable rule that sets Enabled=True on match and Enabled=False on no-match; applies immediately when AApply is True (default).
function EnableWhere(ASource: TComponent; const AItemsPath: string; const AFieldName: string; AExpressionOperator: TTMSFNCFilterBuilderExpressionOperator; const AValue: TTMSFNCValue; const AApply: Boolean = True; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
ASource |
Root component the RTTI path resolver navigates from. |
AItemsPath |
RTTI path to the target collection or item. |
AFieldName |
Name of the item field to test. |
AExpressionOperator |
Comparison operator to apply. |
AValue |
Value to compare against. |
AApply |
When True (default), immediately applies the rule after configuration. |
AInactiveCallBackAction |
Optional callback fired per item when the rule is inactive. |
Overload 2
Upserts an enable rule with explicit field type; sets Enabled=True on match, Enabled=False on no-match.
function EnableWhere(ASource: TComponent; const AItemsPath: string; const AFieldName: string; AFieldType: TTMSFNCFilterBuilderDataType; AExpressionOperator: TTMSFNCFilterBuilderExpressionOperator; const AValue: TTMSFNCValue; const AApply: Boolean = True; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
ASource |
Root component the RTTI path resolver navigates from. |
AItemsPath |
RTTI path to the target collection or item. |
AFieldName |
Name of the item field to test. |
AFieldType |
Explicit data type for the field. |
AExpressionOperator |
Comparison operator to apply. |
AValue |
Value to compare against. |
AApply |
When True (default), immediately applies the rule after configuration. |
AInactiveCallBackAction |
Optional callback fired per item when the rule is inactive. |
Overload 3
Upserts an enable rule with two conditions joined by a group operator; sets Enabled=True on match, Enabled=False on no-match.
function EnableWhere(ASource: TComponent; const AItemsPath: string; const AFieldName: string; AExpressionOperator: TTMSFNCFilterBuilderExpressionOperator; const AValue: TTMSFNCValue; AGroupOperator: TTMSFNCFilterBuilderGroupOperator; const AFieldName2: string; AExpressionOperator2: TTMSFNCFilterBuilderExpressionOperator; const AValue2: TTMSFNCValue; const AApply: Boolean = True; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
ASource |
Root component the RTTI path resolver navigates from. |
AItemsPath |
RTTI path to the target collection or item. |
AFieldName |
Name of the first item field to test. |
AExpressionOperator |
Comparison operator for the first condition. |
AValue |
Value for the first condition. |
AGroupOperator |
Logical operator joining the two conditions. |
AFieldName2 |
Name of the second item field to test. |
AExpressionOperator2 |
Comparison operator for the second condition. |
AValue2 |
Value for the second condition. |
AApply |
When True (default), immediately applies the rule after configuration. |
AInactiveCallBackAction |
Optional callback fired per item when the rule is inactive. |
Overload 4
Upserts an enable rule with two conditions and explicit field types; sets Enabled=True on match, Enabled=False on no-match.
function EnableWhere(ASource: TComponent; const AItemsPath: string; const AFieldName: string; AFieldType: TTMSFNCFilterBuilderDataType; AExpressionOperator: TTMSFNCFilterBuilderExpressionOperator; const AValue: TTMSFNCValue; AGroupOperator: TTMSFNCFilterBuilderGroupOperator; const AFieldName2: string; AFieldType2: TTMSFNCFilterBuilderDataType; AExpressionOperator2: TTMSFNCFilterBuilderExpressionOperator; const AValue2: TTMSFNCValue; const AApply: Boolean = True; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
ASource |
Root component the RTTI path resolver navigates from. |
AItemsPath |
RTTI path to the target collection or item. |
AFieldName |
Name of the first item field to test. |
AFieldType |
Explicit data type for the first field. |
AExpressionOperator |
Comparison operator for the first condition. |
AValue |
Value for the first condition. |
AGroupOperator |
Logical operator joining the two conditions. |
AFieldName2 |
Name of the second item field to test. |
AFieldType2 |
Explicit data type for the second field. |
AExpressionOperator2 |
Comparison operator for the second condition. |
AValue2 |
Value for the second condition. |
AApply |
When True (default), immediately applies the rule after configuration. |
AInactiveCallBackAction |
Optional callback fired per item when the rule is inactive. |
Overload 5
Upserts an enable rule targeting Source directly; sets Enabled=True on match, Enabled=False on no-match.
function EnableWhere(ASource: TComponent; const AFieldName: string; AExpressionOperator: TTMSFNCFilterBuilderExpressionOperator; const AValue: TTMSFNCValue; const AApply: Boolean = True; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
ASource |
Root component to evaluate directly. |
AFieldName |
Name of the field to test on Source. |
AExpressionOperator |
Comparison operator to apply. |
AValue |
Value to compare against. |
AApply |
When True (default), immediately applies the rule after configuration. |
AInactiveCallBackAction |
Optional callback fired when the rule is inactive. |
Overload 6
Upserts an enable rule targeting Source directly with explicit field type; sets Enabled=True on match, Enabled=False on no-match.
function EnableWhere(ASource: TComponent; const AFieldName: string; AFieldType: TTMSFNCFilterBuilderDataType; AExpressionOperator: TTMSFNCFilterBuilderExpressionOperator; const AValue: TTMSFNCValue; const AApply: Boolean = True; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
ASource |
Root component to evaluate directly. |
AFieldName |
Name of the field to test on Source. |
AFieldType |
Explicit data type for the field. |
AExpressionOperator |
Comparison operator to apply. |
AValue |
Value to compare against. |
AApply |
When True (default), immediately applies the rule after configuration. |
AInactiveCallBackAction |
Optional callback fired when the rule is inactive. |