AdapTable has a range of powerful filter functions. These include Column Filters, System Filters and User Filters (that users create at run-time) and in most cases are sufficient for all needs.
But occasionally you might want to filter a column based on other data in the row or using internal logic not available to the Grid or even using an external lookup.
This is where Named Filters come in. You can create at design time a Named Filter and provide AdapTable with the Predicate function required to evaluate it.
Named Filters operate either on a Single Column or all Columns of a DataType (e.g. Date) which you define in the Named Filters section of Config.
In this example we created 4 Named Filters and associated Predicate Functions:
- High on OrderId Column that evaluates based on data in Invoiced and ItemCount columns
- New Starter on Employee column which mimics a lookup to an internal CRM system (and which is also a column filter)
- Post Takeover which operates on all Date columns and evaluates true if date in cell was after a putative takeover date.
- After Work which operates on the LastUpdatedTime Column and returns any time after 5pm.