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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈