FieldRef.Name() Method
Version: Available or changed with runtime version 1.0.
Gets the name of a field as a string.
Syntax
Name := FieldRef.Name()
Note
This method can be invoked using property access syntax.
Parameters
FieldRef
Type: FieldRef
An instance of the FieldRef data type.
Return Value
Name
Type: Text
Remarks
The Caption Method (FieldRef, TestPage Field) method retrieves the Caption Property of a field. To enable your application for multilanguage functionality, you must use the FieldCaption Method (Record) instead.
This method is similar to the FieldName Method (Record).
Example
The following example opens the Customer table as a RecordRef variable that is named CustomerRecref. The Field Method (RecordRef) creates a reference to the fields in the table and stores the FieldRef in the MyFieldRef variable. The code loops through field 1 through 5. For each field, the Name method retrieves the name of the field and stores the value in the varName variable. The field number and the value in the varName variable are displayed in a message box.
var
MyFieldRef: FieldRef;
CustomerRecref: RecordRef;
varName: Text;
i: Integer;
Text000: Label 'The name of field %1 is "%2".\\';
begin
for i := 1 to 5 do begin
CustomerRecref.Open(Database::Customer);
MyFieldRef := CustomerRecref.Field(i);
varName := MyFieldRef.Name;
Message(Text000, i, varName);
CustomerRecref.Close;
end;
end;
See Also
FieldRef Data Type
Get Started with AL
Developing Extensions
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : pendant toute l’année 2024, nous allons éliminer progressivement Problèmes GitHub comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, voir :Soumettre et afficher des commentaires pour