It's very weird and I succeeded finding a workaround. Let me explain:
I have 2 arrays of objects and I want to find what items in the 2nd array exist in the 1st array.
I know it can be done using 'Apply to each' but it can take time depending on the number of items in the arrays.
Consequently I tried using the 'Filter array' action with 'contains'.
In the From field I put the 1st array (Output) and under: 2nd array (varBestUsers) - Contains - item().
Unfortunately it doesn't work: nothing is found.
However I found a workaround to make it work:
I replaced item() by:
I believe that your issue could have been solved by using a union() expression.
Sorry, I should have said intersection() and not union()
My understanding is that you want to find the common elements between two arrays:
Hi @ScottShearer, Thanks for your response. In fact intersection or contains functions only works with strings and not numbers (after Select or Get items). Once I converted all numbers to strings it eventually worked.
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.