Table of contents
TOC
Collapse the table of content
Expand the table of content

List.ReplaceValue

Owen Duncan|Last Updated: 4/19/2018

About

Searches a list of values for the value and replaces each occurrence with the replacement value.

List.ReplaceValue(list as list,  oldValue as any, newValue as any,  replacer as function) as list  

Arguments

ArgumentDescription
listThe List to modify.
oldValueThe value to replace.
newValueThe new value to replace with.
replacerA function provided as replacer determines the kind of values that are being replaced. Built-in functions be be used such as Replacer.ReplaceText and Replacer.ReplaceValue.

Example

List.ReplaceValue({"a", "B", "a", "a"}, "a", "A", Replacer.ReplaceText) equals {"A", "B", "A", "A"}  
© 2018 Microsoft