FireDAC.Comp.DataSet.TFDAggregates.FindAggregate

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FindAggregate(const AName: String): TFDAggregate;

C++

TFDAggregate* __fastcall FindAggregate(const System::UnicodeString AName);

Properties

Type Visibility Source Unit Parent
function public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDAggregates

Description

Finds a TFDAggregate object by its name.

Use the FindAggregate method to find an aggregated value by its name. If the object is not found, FindAggregate returns nil.

Example

var
  oAgg: TFDAggregate;
...
oAgg := FDQuery1.Aggregates.FindAggregate('a1');
if oAgg <> nil then
  Label1.Caption := VarToStr(oAgg.Value);

See Also