TTMSFNCCustomFilterRulesManager.AddRuleEquals Method
Adds an equals-condition rule with no action; the caller adds actions via the returned rule; AApply defaults to False.
API unit family: TMS.TMSFNCFilterRulesManager
Declaring type: TTMSFNCCustomFilterRulesManager
Overloads
Overload 1
Adds an equals-condition rule with no action; the caller adds actions via the returned rule; AApply defaults to False.
function AddRuleEquals(const AName: string; ASource: TComponent; const AItemsPath: string; const AFieldName: string; const AValue: TTMSFNCValue; AActive: Boolean = True; AApply: Boolean = False; ACallBackAction: TTMSFNCFilterRuleApplyCallBackEvent = nil; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
AName |
Identifier for the rule. |
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. |
AValue |
Value the field must equal. |
AActive |
When True (default), the rule is evaluated on Apply. |
AApply |
When True, immediately applies the rule after creation; defaults to False. |
ACallBackAction |
Optional callback fired per item while the rule is active. |
AInactiveCallBackAction |
Optional callback fired per item when the rule is inactive. |
Overload 2
Adds an equals-condition rule targeting Source directly with no action; the caller adds actions via the returned rule.
function AddRuleEquals(const AName: string; ASource: TComponent; const AFieldName: string; const AValue: TTMSFNCValue; AActive: Boolean = True; AApply: Boolean = False; ACallBackAction: TTMSFNCFilterRuleApplyCallBackEvent = nil; AInactiveCallBackAction: TTMSFNCFilterRuleInactiveCallBackEvent = nil): TTMSFNCFilterRule; overload;
Parameters
| Name | Description |
|---|---|
AName |
Identifier for the rule. |
ASource |
Root component to evaluate directly. |
AFieldName |
Name of the field to test on Source. |
AValue |
Value the field must equal. |
AActive |
When True (default), the rule is evaluated on Apply. |
AApply |
When True, immediately applies the rule after creation; defaults to False. |
ACallBackAction |
Optional callback fired per item while the rule is active. |
AInactiveCallBackAction |
Optional callback fired per item when the rule is inactive. |