Export (0) Print
Expand All

FIELDNAME Function (Record)

Returns the name of a field as a string.


Name := Record.FIELDNAME(Field)

Parameters

Record

Type: Record

The name of the record that contains the field.

Field

Type: Field

The name of the field in the record.

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.

Variable name DataType Subtype Length

NameOfField

Text

 

64

CustomerRec

Record

Customer

 

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.

Community Additions

ADD
Show:
© 2015 Microsoft