Record.FromTable
Record.FromTable(table as table) as record
返回记录表 table
中包含字段名称和值名称 {[Name = name, Value = value]}
的记录。 如果字段名称不唯一,则会引发异常。
从 Table.FromRecords({[Name = "CustomerID", Value = 1], [Name = "Name", Value = "Bob"], [Name = "Phone", Value = "123-4567"]}) 格式的表创建记录。
使用情况
Record.FromTable(
Table.FromRecords({
[Name = "CustomerID", Value = 1],
[Name = "Name", Value = "Bob"],
[Name = "Phone", Value = "123-4567"]
})
)
输出
[CustomerID = 1, Name = "Bob", Phone = "123-4567"]