Table of Contents

TTMSFNCFilterRulesManager Class

Published filter rules manager that exposes Rules and all events in the DFM designer; drop on a form to configure filter rules at design time.

API unit family: TMS.TMSFNCFilterRulesManager Inherits from: TTMSFNCCustomFilterRulesManager

Syntax

TTMSFNCFilterRulesManager = class(TTMSFNCCustomFilterRulesManager)

Properties

Name Description
Placeholders Collection of named text sources whose values are substituted into rule text before a rule is applied. (inherited from TTMSFNCCustomFilterRulesManager)
Rules Collection of filter rules applied by this manager. (inherited from TTMSFNCCustomFilterRulesManager)

Methods

Name Description
AddPlaceholder Adds a text-source entry that substitutes {APlaceholderName} in FilterText and ItemsPath with the value of APropertyName on ASource at Apply time; returns Self for chaining. (inherited from TTMSFNCCustomFilterRulesManager)
AddRule Adds a rule with a raw filter-text expression; returns the new rule. (inherited from TTMSFNCCustomFilterRulesManager)
AddRuleContains Adds a contains-condition rule with no action; the caller adds actions via the returned rule. (inherited from TTMSFNCCustomFilterRulesManager)
AddRuleEndsWith Adds an ends-with condition rule with no action; the caller adds actions via the returned rule. (inherited from TTMSFNCCustomFilterRulesManager)
AddRuleEquals Adds an equals-condition rule with no action; the caller adds actions via the returned rule; AApply defaults to False. (inherited from TTMSFNCCustomFilterRulesManager)
AddRuleStartsWith Adds a starts-with condition rule with no action; the caller adds actions via the returned rule. (inherited from TTMSFNCCustomFilterRulesManager)
Apply Applies all active rules in order, firing OnBeforeApply and OnAfterApply events. (inherited from TTMSFNCCustomFilterRulesManager)
ApplyActiveRules Applies active rules whose Name matches APattern using SQL-LIKE wildcards (% = any sequence, _ = one char); prefix with ! to invert the match. (inherited from TTMSFNCCustomFilterRulesManager)
ApplyInactiveRule Pushes inactive values for one rule regardless of its Active flag; fires rule-level events. (inherited from TTMSFNCCustomFilterRulesManager)
ApplyRule Applies a single rule, respecting its Active flag; fires rule-level events. (inherited from TTMSFNCCustomFilterRulesManager)
DisableWhere Upserts a disable rule that sets Enabled=False on match and Enabled=True on no-match; applies immediately when AApply is True (default). (inherited from TTMSFNCCustomFilterRulesManager)
EnableWhere Upserts an enable rule that sets Enabled=True on match and Enabled=False on no-match; applies immediately when AApply is True (default). (inherited from TTMSFNCCustomFilterRulesManager)
GetRuleByName Returns the first rule whose Name matches AName (case-insensitive), or nil when not found. (inherited from TTMSFNCCustomFilterRulesManager)
HideWhere Upserts a visibility rule that sets Visible=False on match, Visible=True on no-match and when inactive; applies immediately when AApply is True (default). (inherited from TTMSFNCCustomFilterRulesManager)
ShowWhere Upserts a visibility rule that sets Visible=True on match and Visible=False on no-match; applies immediately when AApply is True (default). (inherited from TTMSFNCCustomFilterRulesManager)

Events

Name Description
OnAfterApply Raised after Apply has finished all rules. (inherited from TTMSFNCCustomFilterRulesManager)
OnAfterApplyItem Raised after an item has been processed; AMatched is False for inactive rules. (inherited from TTMSFNCCustomFilterRulesManager)
OnAfterApplyRule Raised after a rule has been applied. (inherited from TTMSFNCCustomFilterRulesManager)
OnBeforeApply Raised before Apply runs all rules; set AAllow to False to cancel. (inherited from TTMSFNCCustomFilterRulesManager)
OnBeforeApplyItem Raised before an item is processed; set AAllow to False to skip it. (inherited from TTMSFNCCustomFilterRulesManager)
OnBeforeApplyRule Raised before a rule is applied; set AAllow to False to skip that rule. (inherited from TTMSFNCCustomFilterRulesManager)
OnMatchItem Raised after filter evaluation; set AMatched to override the result before callbacks and actions run. (inherited from TTMSFNCCustomFilterRulesManager)

Used by