YOUSEFUL / DELPHI / COMPONENTS

TAtlasFilter

One filter condition: field, operator and value as text.

Record Unit Atlas.Analytics · Product Atlas Analytics

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

MemberKindWhat it does
FieldfieldColumn name, matched without regard to case.
OperatorKindfieldThe comparison.
ValuefieldThe value to compare with, as text.
CreatemethodReturns 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.

pascal
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.

pascal
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;

TAtlasFilterOperator · TAtlasAnalytics · TAtlasReportDefinition · TAtlasDashboard

Also in Atlas Analytics

TAtlasReportDefinition · TAtlasDashboard