Record.FromTable

Sintaxe

Record.FromTable(table as table) as record  

Sobre

Retorna um registro de uma tabela de registros table contendo nomes de campo e nomes de valores {[Name = name, Value = value]}. Uma exceção será gerada se os nomes de campo não forem exclusivos.

Exemplo 1

Criar um registro da tabela no formato Table.FromRecords({[Name = "CustomerID", Value = 1], [Name = "Name", Value = "Bob"], [Name = "Phone", Value = "123-4567"]}).

Usage

Record.FromTable(
    Table.FromRecords({
        [Name = "CustomerID", Value = 1],
        [Name = "Name", Value = "Bob"],
        [Name = "Phone", Value = "123-4567"]
    })
)

Saída

[CustomerID = 1, Name = "Bob", Phone = "123-4567"]