Table.Keys
Table.Keys(table as table) as list
Returnerer nøklene til den angitte tabellen.
Få listen over nøkler for en tabell.
Bruk
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
Utdata
{[Columns = {"Id"}, Primary = true]}