FIELDNAME Function (Record)
Gets the name of a field as a string.
Name := Record.FIELDNAME(Field)
The name of the record that contains the field.
The name of the field in the record.
Property Value/Return Value
Type: Text constant or code
The name of the field specified.
The FIELDCAPTION Function (Record) retrieves the Caption Property of a field. If you want to enable your application for multilanguage functionality now or in the future, you must use the FIELDCAPTION function instead of the FIELDNAME function.
This example requires that you create the following variables.
NameOfField := CustomerRec.FIELDNAME("No.");
The name of the field is stored in a string.
The advantage of using this statement instead of
Name := 'No.'; is that using the FIELDNAME function dynamically adapts to any change to the field name made in the development system. The statement
Name := 'No.'; performs a static assignment.