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

List.ReplaceMatchingItems

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Replaces occurrences of existing values in the list with new values using the provided equationCriteria. Old and new values are provided by the replacements parameters. An optional equation criteria value can be specified to control equality comparisons. For details of replacement operations and equation criteria, see Parameter Values.

List.ReplaceMatchingItems(list as list, replacements as any ,optional equationCriteria as any) as list  

Arguments

ArgumentDescription
listThe List to modify.
replacementsThe replacements to make.
optional equationCriteriaAn optional equation criteria value to control equality testing.

Examples

List.ReplaceMatchingItems ({1, 2, 3, 4, 5}, {{2, -2}}) equals { 1, -2, 3, 4, 5}  
List.ReplaceMatchingItems ({1, 2, 3, 4, 5}, {{2, -2}, {3, -3}}) equals { 1, -2, -3, 4, 5}  
© 2018 Microsoft