Skip to main content

List.RemoveMatchingItems

Removes all occurrences of the input values.

Syntax​

List.RemoveMatchingItems(
list1 as list,
list2 as list,
optional equationCriteria as any
) as list

Remarks​

Removes all occurrences of the given values in list2 from the list list1. If the values in list2 don't exist in list1, the original list is returned. An optional equation criteria value, equationCriteria, can be specified to control equality testing.

Examples​

Example #1​

Create a list from {1, 2, 3, 4, 5, 5} without {1, 5}.

List.RemoveMatchingItems({1, 2, 3, 4, 5, 5}, {1, 5})

Result:

{2, 3, 4}

Category​

List.Transformation functions