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