Record.FieldName(Any) Method
Version: Available or changed with runtime version 1.0.
Gets the name of a field as a string.
Syntax
Name := Record.FieldName(Field: Any)
Parameters
Record
Type: Record
An instance of the Record data type.
Field
Type: Any
The name of the field in the record.
Return Value
Name
Type: Text
Remarks
The advantage of using the FieldName method call instead of a static assignment, like NameOfField := 'MyField', is that using the FieldName method dynamically adapts to any change to the field name made in the development environment.
Example
The following example gets the name of the No. field in the Customer table, and stores it in a string.
var
NameOfField: Text;
CustomerRec: Record Customer;
begin
NameOfField := CustomerRec.FieldName("No.");
end;
See Also
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour