YOUSEFUL / DELPHI / COMPONENTS
TAtlasFilter
One filter condition: field, operator and value as text.
Description
Used by TAtlasAnalytics.Select, TAtlasReportDefinition.SetFilters and TAtlasDashboard.SetFilters. Several filters are combined with AND. The value is always text in invariant form: numbers with a . decimal point, dates as YYYY-MM-DD, booleans as true, false, 1 or 0. An empty value stands for a missing value. See TAtlasAnalytics for how each column kind compares.
Members
| Member | Kind | What it does |
|---|---|---|
Field | field | Column name, matched without regard to case. |
OperatorKind | field | The comparison. |
Value | field | The value to compare with, as text. |
Create | method | Returns a filter. |
Methods
Create method
class function Create(const Field, Value: string; OperatorKind: TAtlasFilterOperator = afEqual): TAtlasFilter; static;Returns a filter. Note the argument order: field, value, then the operator, which defaults to afEqual. Nothing is validated until the filter is used.
TAtlasFilter.Create('Revenue', '10000', afGreaterEqual)Fields
Field field
Field: string;Column name, matched without regard to case.
OperatorKind field
OperatorKind: TAtlasFilterOperator;The comparison. See TAtlasFilterOperator.
Value field
Value: string;The value to compare with, as text.
Examples
Large West sales since September
Three filters: case-insensitive text equality, a numeric bound and a date bound.
uses Atlas.Data, Atlas.Analytics;
function LargeRecentWestSales(Sales: TAtlasTable): TAtlasTable;
begin
Result := TAtlasAnalytics.Select(Sales, ['Product', 'Revenue', 'Booked'], [
TAtlasFilter.Create('Region', 'west'),
TAtlasFilter.Create('Revenue', '10000', afGreaterEqual),
TAtlasFilter.Create('Booked', '2026-09-01', afGreaterEqual)]);
end;
Related
TAtlasFilterOperator · TAtlasAnalytics · TAtlasReportDefinition · TAtlasDashboard