Sintaxe
M
Table.FromRecords(records as list, optional columns as any, optional missingField as nullable number) as tableParâmetros
- recordslistObrigatório
Lista de registros a converter em tabela.
M{[CustomerID = 1, Name = "Bob", Phone = "123-4567"], ...}- columnsanyOpcional
Lista de nomes de coluna ou o tipo da tabela.
- missingFieldnullable numberOpcional
Como tratar campos ausentes em uma linha.
Retorna
tableExemplo
M
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})Resultado
M
#table(type table[CustomerID = any, Name = any, Phone = any],
{
{1, "Bob", "123-4567"},
{2, "Jim", "987-6543"},
{3, "Paul", "543-7890"}
})Mais informações
- Subgrupo
- Table