Table.ReplaceValue
Syntax
Table.ReplaceValue(table as table, oldValue as any, newValue as any, replacer as function, columnsToSearch as list) as table
About
Replaces oldValue
with newValue
in the specified columns of the table
.
Example 1
Replace the text "goodbye" with the text "world" in the table.
Table.ReplaceValue(Table.FromRecords({[a = 1, b = "hello"], [a = 3, b = "goodbye"]}), "goodbye", "world", Replacer.ReplaceText, {"b"})
a | b |
---|---|
1 | hello |
3 | world |
Example 2
Replace the text "ur" with the text "or" in the table.
Table.ReplaceValue(Table.FromRecords({[a = 1, b = "hello"], [a = 3, b = "wurld"]}), "ur", "or", Replacer.ReplaceText, {"b"})
a | b |
---|---|
1 | hello |
3 | world |