跳到主要内容

Record.ToTable

返回一个表,其中的每行是输入记录的字段名称和值。

Syntax

Record.ToTable(
record as record
) as table

Remarks

返回一个表,它包含 NameValue 列以及对应于 record 中每个字段的行。

Examples

Example #1

从记录返回表。

Record.ToTable([OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0])

Result:

Table.FromRecords({
[Name = "OrderID", Value = 1],
[Name = "CustomerID", Value = 1],
[Name = "Item", Value = "Fishing rod"],
[Name = "Price", Value = 100]
})

Category

Record.Serialization