List of column names that I have. I want to use the elements from another list to filter the current list. Any column names that contain any of the items in the myFilter List should be returned, if possible. I can create the filter if the filter is a text item, but I was unable to walk through each item and produce a list.
ColumnNames= {"E ID", "W ID", "P Chemical", "XIC","YFE","ZIC"}
myFilter = {"W ID","IC"}
The result should be:
Result = {"W ID","P Chemical", "XIC", "ZIC"}
As IC is contained in Chemical, XIC and ZIC, and W ID is a full match.
I imagine it should be something like this:
List.Select(ColumnNames, each Text.Contains(_, each myFilter{_}))
Because it works with this
List.Select(ColumnNames,each Text.Contains(_,"W ID"))
But I cannot get the right code. Can someone please help me with this?