Record.ReorderFields
語法
Record.ReorderFields(record as record, fieldOrder as list, optional missingField as nullable number) as record
關於
按照清單 fieldOrder
中指定的欄位順序重新排列 record
中的欄位之後,傳回記錄。 欄位值會保存下來,而且 fieldOrder
中未列出的欄位會保留在原始位置。
範例 1
重新排列記錄中的某些欄位。
使用方式
Record.ReorderFields(
[CustomerID = 1, OrderID = 1, Item = "Fishing rod", Price = 100.0],
{"OrderID", "CustomerID"}
)
輸出
[OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0]