Record.ReorderFields
Record.ReorderFields(record as record, fieldOrder as list, optional missingField as nullable number) as record
按列表 fieldOrder
中指定的字段顺序将 record
中的字段重新排序后,返回一个记录。字段值保持不变,fieldOrder
中未列出的字段仍留在原始位置。
示例:
将记录中的部分字段重新排序。
使用情况:
Record.ReorderFields([CustomerID= 1, OrderID = 1, Item = "Fishing rod", Price = 100.0], {"OrderID", "CustomerID"})
输出:
[OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0]