Skip to main content

CheckFields

function CheckFields(aFieldNames: string): string;

Example

function AddressChangeInput(const View: TdaSQLQueryDataView): string;
begin
Result := View.CheckFields('Address1,Address2,PostCode');
end;

Usage

CheckFields concatenates selected physical field values from a comma-tokenized name list as a change hint, retaining the collision and null-loss limits of CheckAll.

  • Supply an explicit stable field order and physical names.
  • Use a canonical framed serialisation for durable hashes, deduplication keys or security decisions.
  • Validate the list at configuration time with FieldExists.

Additional Technical Info

CheckFields is the selected-field counterpart to CheckAll. Its result is suitable only as an input to tolerant change detection, not as a canonical composite key.

Source-backed behaviour

The method reuses the view's cached TvxStringAppend, resets it, tokenizes aFieldNames with Velox StringToToken using comma as the separator, then appends FieldByName(token).AsString in supplied token order. The temporary TStringList is freed in finally, and the partially built data is assigned to the local result even if field lookup/conversion raises; the exception still propagates so the caller does not receive that partial value normally.

No separator, length, name, type or null marker is inserted between values. Composite collisions and null/empty collapse remain. This method uses physical dataset names through FieldByName, not the DataPipeline aliases accepted by the default Fields property. The cached builder makes concurrent calls on one view unsafe.

Official terminal references

Created 2026-07-15