Compare and combine two arrays' collections into one array of collections, where conditions are met between collections

Hi there :slightly_smiling_face:

I wish to compare two arrays’s collections, merge those collections and put them into a new array, where conditions are met on the collections’ parameters.

Please see this screendump, where I have tried to draw my thoughts:

My end goal is to have one array containing collections of data from both arrays, where e.g. these two conditions are met:

  1. The number after inv- “xxxxx” in the description of the first array’s collections is in the “text”-parameter of the second arrays’ collections.
  2. That the “amount" is equal “amount” in both arrays’ collections.

From that comparison, I wish to create one array containing collections, where all parameters are present from both collections, where the conditions where met.

I hope that my question makes sense :grimacing:

Thanks!

Br. Mathias

Hello @Mathias

In regard to your issue, could I kindly suggest that you try using the merge function to achieve this. And with the filter, you could match the required values into the new one in the set variable module.

Because the invoice is part of the text, you could use the split function to get just the invoice number.

M.

2 Likes