
Hello - I've hit a wall with this one. I have a dataset (D1 - below) that can be formatted into a collection or a table depending on how y'all can help answer this one. I need to filter a secondary dataset (D2 - below) depending if one of the string-type columns contains any of the items in D1.
Boiled Down - need function to return true if any of the D1 items (essentially substrings) are found in the D2 column string.
D1 Example
["ABC-0001","ABC-0004"]
D2 Example Rows Of The Column that needs to be filtered (Data Source Name - "TASK DATA", Column Name "TEST_COL"
1. "ABC-0001"
2. "ABC-0004"
3. "ABC-0003,ABC-0007,ABC-0008"
4. "ABC-0005"
5. "ABC-0004,ABC-0005"
6. "ABC-0011"
Desired return:
1. "ABC-0001"
2. "ABC-0004"
5. "ABC-0004,ABC-0005"
Hi,
You could achieve this like this :
ForAll(
D1 As d1,
Collect(
DResult,
ForAll(
Filter(
D2 As d2,
d1.Value in d2.Text
),
ThisRecord
)
)
)
The idea is to use nested ForAll loop to "join" the two collections into another one.
Collections used for reference :
Regards,