YOUSEFUL / DELPHI / COMPONENTS

TAtlasColumnKind

The four value kinds of a TAtlasTable column: text, number, boolean and date.

Enumeration Unit Atlas.Data · Product Atlas VCL

Description

Every column of a TAtlasTable has one kind. The kind decides which strings AddRow, SetCell, ImportCSV and TAtlasValueEdit accept, the normalized form that is stored, how Sort compares values and how TAtlasGrid aligns them. An empty string is accepted by every kind. Values stay strings: convert them with TFormatSettings.Invariant, never with the user's locale. AtlasNormalizeValue(Kind, Value) applies the rules to a single value.

Members

MemberKindWhat it does
ackTextvalueAny text, stored unchanged (including leading and trailing spaces).
ackNumbervalueA finite number in invariant format: . as decimal separator, optional sign and exponent, no thousands separators (12.50, -3, 1e3; surrounding spaces are accepted).
ackBooleanvaluetrue or false in any case, or 1 / 0.
ackDatevalueA calendar date written exactly as YYYY-MM-DD: four-digit year 0001 to 9999, two-digit month and day, and a real date (2024-02-29 is accepted, 2025-02-29 is not).

Values

ackText value

ackText

Any text, stored unchanged (including leading and trailing spaces).

ackNumber value

ackNumber

A finite number in invariant format: . as decimal separator, optional sign and exponent, no thousands separators (12.50, -3, 1e3; surrounding spaces are accepted). Stored in the shortest invariant form (12.5, -3, 1000). NaN, INF, 1,000 and locale forms such as 12,5 raise EAtlasDataError. Sorted numerically and right-aligned in TAtlasGrid.

ackBoolean value

ackBoolean

true or false in any case, or 1 / 0. Stored as true or false.

ackDate value

ackDate

A calendar date written exactly as YYYY-MM-DD: four-digit year 0001 to 9999, two-digit month and day, and a real date (2024-02-29 is accepted, 2025-02-29 is not). Stored unchanged, so text order is date order. There is no time part and no locale format.

Examples

See what each kind stores

AtlasNormalizeValue returns the stored form or raises, exactly like AddRow. The comments show the output.

pascal
uses System.SysUtils, Atlas.Data;

procedure ShowNormalizedValues;
begin
  Writeln(AtlasNormalizeValue(ackNumber, '12.50'));    // 12.5
  Writeln(AtlasNormalizeValue(ackNumber, '1e3'));      // 1000
  Writeln(AtlasNormalizeValue(ackBoolean, 'TRUE'));    // true
  Writeln(AtlasNormalizeValue(ackBoolean, '0'));       // false
  Writeln(AtlasNormalizeValue(ackDate, '2024-02-29')); // 2024-02-29
  try
    AtlasNormalizeValue(ackNumber, '12,5');
  except
    on E: EAtlasDataError do
      Writeln(E.Message);                              // Invalid finite number: 12,5
  end;
end;

TAtlasTable · TAtlasColumn · TAtlasValueEdit

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer