Data.DB.TField.LookupList

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property LookupList: TLookupList read GetLookupList;

C++

__property TLookupList* LookupList = {read=GetLookupList};

Properties

Type Visibility Source Unit Parent
property public
Data.DB.pas
Data.DB.hpp
Data.DB TField

Description

Indicates a cache of values from the LookupDataSet indexed by a set of values from the KeyFields property.

Inspect LookupList to find the cached value assigned to the field for a given set of values on the fields specified by KeyFields. The value of LookupList is set when the dataset is open or the RefreshLookupList method is called.

Tip: Applications can also fill LookupList programmatically to provide lookup values as long as the LookupDataSet property is not set.

The ValueOfKey method of the LookupList returns the value of the LookupResultField for a set of values on the LookupKeyFields. This allows the value of the lookup field object to be computed as follows:



Value := LookupList.ValueOfKey(DataSet.FieldValues[KeyFields]);



Value = LookupList->ValueOfKey(DataSet->FieldValues[KeyFields]);



Note: LookupList is only meaningful when the value of FieldKind is fklookup and the LookupCache property is true.

See Also