Table.ReplaceKeys
Syntax
Table.ReplaceKeys(table as table, keys as list) as table
O
Nahradí kľúče zadanej tabuľky.
Príklad č. 1
Nahradenie existujúcich kľúčov tabuľky.
používania
let
table = Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
}),
tableWithKeys = Table.AddKey(table, {"Id"}, true),
resultTable = Table.ReplaceKeys(tableWithKeys, {[Columns = {"Id"}, Primary = false]})
in
resultTable
výstupu
Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
})