Sintaxe
M
Table.ReplaceKeys(table as table, keys as list) as tableParâmetros
- tabletableObrigatório
Tabela cujas chaves serão substituídas.
MtableWithKeys- keyslistObrigatório
Lista de registros de chave com
ColumnsePrimary.M{[Columns = {"Id"}, Primary = false]}
Retorna
tableExemplo
M
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]}),
newKeys = Table.Keys(resultTable)
in
newKeysResultado
M
{[Columns = {"Id"}, Primary = false]}Mais informações
- Subgrupo
- Table