TTMSFNCFilterRulesManager.AddRule Method
Adds a rule with a raw filter-text expression and one action (match value only); returns the new rule.
API unit family: TMS.TMSFNCFilterRulesManager
Declaring type: TTMSFNCFilterRulesManager
Inherited from: TTMSFNCCustomFilterRulesManager
Overloads
Overload 1
Adds a rule with a raw filter-text expression and one action (match value only); returns the new rule.
function AddRule(const AName: string; ASource: TComponent; const AItemsPath: string; AFilterText: string; ATargetPath: string; const AMatchValue: TTMSFNCValue; AActive: Boolean = True): 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. |
AFilterText |
Filter expression; empty to match all items. |
ATargetPath |
RTTI path on each item to write the value to. |
AMatchValue |
Value written when the filter matches. |
AActive |
When True (default), the filter expression is evaluated on Apply. |
Returns
The newly added and configured rule.
Overload 2
Adds a rule with a raw filter-text expression and one action with match and no-match values; returns the new rule.
function AddRule(const AName: string; ASource: TComponent; const AItemsPath: string; AFilterText: string; ATargetPath: string; const AMatchValue: TTMSFNCValue; ANoMatchValue: TTMSFNCValue; AActive: Boolean = True): 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. |
AFilterText |
Filter expression; empty to match all items. |
ATargetPath |
RTTI path on each item to write the value to. |
AMatchValue |
Value written when the filter matches. |
ANoMatchValue |
Value written when the filter does not match. |
AActive |
When True (default), the filter expression is evaluated on Apply. |
Returns
The newly added and configured rule.