Table.ReplaceKeys
Vervangt de sleutels van de opgegeven tabel.
Syntax
Table.ReplaceKeys(
table as table,
keys as list
) as table
Remarks
Vervangt de sleutels van de opgegeven tabel.
Examples
Example #1
Vervang de bestaande sleutels van een tabel.
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
Result:
Table.FromRecords({
[Id = 1, Name = "Hello There"],
[Id = 2, Name = "Good Bye"]
})
Category
Table.Transformation