Sign in Join
FPDoc Onlineexperiment

TFields.FieldByName function

Member of TFieldspublicIn unit DB

Find a field based on its name.

Declaration

pascal
function FieldByName(const Value: string): TField

Arguments

Value

Fieldname to search for.

Function result

Field instance with FieldName matching Value.

Description

Fieldbyname searches the list of fields and returns the field instance whose FieldName property matches Value. The search is performed case-insensitively.

Errors

If no field instance is found, then an exception is raised. If this behaviour is undesired, use FindField, where Nil is returned if no match is found.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.