Table of Contents

Getting Started with TMS FNC Filter Rules Manager

Prerequisites

  • Delphi with TMS FNC Core installed.
  • A VCL, FMX, or WEB application with at least one component whose items you want to filter.

Steps

1. Drop the component

Drop a TTMSFNCFilterRulesManager onto your form from the component palette.

2. Add a visibility rule

Use ShowWhere to show only items whose Text field starts with a given string:

FilterRulesManager1.ShowWhere(
  Planner1,                          // source component
  'Items[*]',                        // RTTI path to the item collection
  'Text',                            // field to test
  feoStartsWith,                     // operator
  TValue.From<string>('B')           // value
);

This creates a rule keyed to Planner1 / Items[*]. Calling ShowWhere again with the same source and path updates the existing rule in place.

3. Call Apply

FilterRulesManager1.Apply;

Each active rule iterates its resolved items, evaluates the filter expression, and writes Visible = True on match and Visible = False on no-match.

4. Deactivate when done

Set a rule's Active property to False to push inactive values (restoring all items to Visible = True) without removing the rule:

FilterRulesManager1.Rules[0].Active := False;

Next steps