web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Contains() expression ...
Power Automate
Unanswered

Contains() expression between two arrays

(0) ShareShare
ReportReport
Posted on by 82

I have two arrays, ManipulatedStrings and AllAccounts. I am searching to get any ManipulatedStrings items that are contained in an array called AllAccounts. This individual process in my flow takes roughly 1 hour to find each true output. AllAccounts has 5000 rows, and my ManipulatedStrings array stores 5 for this example. It took me 5.5 hours to run this as a test â€Œâ€Œ


This is what it looks like currently: 

 

 

dwalker97_0-1622123002312.png

dwalker97_1-1622123048080.png

dwalker97_2-1622123145298.png

 

Can anybody help me with this? Is there any quicker way of doing this? Im not sure why this takes so long. 

 

Thanks!

 

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @dwalker97,

     

    If the structure of both of your arrays are the same you could try and use the intersection function to find the items both collections have in common:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#intersection

     

    Let me know if that works for you.

     

  • dwalker97 Profile Picture
    82 on at

    Hey @Expiscornovus , in my flow I am making two searches. One is for Exact Matches, where I am using the intersection function and works perfect. The above problem is where I am trying to find Possible Matches, so it is different because I need to find array rows that may contain my ManipulatedStrings item. 

     

    For example, 'Company A' is an item in ManipulatedStrings. If there is a 'Company A Ltd' in AllAccounts, it will be a possible match and written to my excel sheet, hence the contains expression 🙂 Thanks!

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @dwalker97,

     

    Sorry, I missed the 'possible match' part of your requirement. You are right, my suggestion only works with exact matches.

     

    Let me go back to the drawing board to see if I can find another approach 😁

  • Verified answer
    dwalker97 Profile Picture
    82 on at

    @Expiscornovus , I have found the solution to my own problem! 😁

     

    Iterate through each array item (SearchAccounts = ManipulatedStrings in below screenshot), I changed the naming. 

     

    The output of each iteration provides me with results of contain! Much quicker than my original post also.

     

    dwalker97_0-1622195692090.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard