Pular para o conteúdo principal

Table.Keys

Retorna as chaves da tabela especificada.

Syntax

Table.Keys(
table as table
) as list

Remarks

Retorna as chaves da tabela especificada.

Examples

Example #1

Obter a lista de chaves de uma tabela.

let
table = Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
}),
tableWithKeys = Table.AddKey(table, {"Id"}, true),
keys = Table.Keys(tableWithKeys)
in
keys

Result:

{[Columns = {"Id"}, Primary = true]}

Category

Table.Transformation