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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應