Table of Contents

TTMSFNCFilterRulesManager.AddRuleStartsWith Method

Adds a starts-with condition rule with no action; the caller adds actions via the returned rule.

API unit family: TMS.TMSFNCFilterRulesManager Declaring type: TTMSFNCFilterRulesManager Inherited from: TTMSFNCCustomFilterRulesManager

Overloads

Overload 1

Adds a starts-with condition rule with no action; the caller adds actions via the returned rule.

function AddRuleStartsWith(const AName: string; ASource: TComponent; const AItemsPath: string; const AFieldName: string; const AValue: string; 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 Prefix the field value must start with.
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 a starts-with condition rule targeting Source directly with no action; the caller adds actions via the returned rule.

function AddRuleStartsWith(const AName: string; ASource: TComponent; const AFieldName: string; const AValue: string; 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 Prefix the field value must start with.
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.