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 / How to check i if any ...
Power Automate
Unanswered

How to check i if any element of array is in another array?

(0) ShareShare
ReportReport
Posted on by 71

I have an array with old emails and an array with new emails i want to check if any old email is in the array of the new emails. How can i do that i dont have any ideaq

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    on at

    Hi @JustusCk ,

    Could you please upload screenshots of the contents of your two arrays?

    If possible, I can help you build a flow to check whether the elements of the old email array are in the new email array.

     

    Best Regards,

    Sunshine Gu

  • JustusCk Profile Picture
    71 on at

     

    JustusCk_1-1713516117769.png

    Yes ofcourse. Thank you

     

  • v-yetonggu-msft Profile Picture
    on at

    Hi @JustusCk ,

    Please check this test:

    vyetonggumsft_1-1713517155855.png

     

    item()
    items('Apply_to_each')
    length(body('Filter_array'))

     

    Best Regards,

    Sunshine Gu

  • Robby_WW Profile Picture
    115 on at

    this is also an option.

    Robby_WW_0-1713517847179.png

    Robby_WW_1-1713517881828.png

     

     

  • JustusCk Profile Picture
    71 on at

    Thank you for the quick answer but what do you put in the Condition if yes or if no?

  • Chriddle Profile Picture
    8,443 Super User 2025 Season 2 on at

    There is a function for this: intersection([<collection1>], [<collection2>], ...)

  • v-yetonggu-msft Profile Picture
    on at

    Hi @JustusCk ï¼Œ

    This is something you should think about yourself.

    For example, when turning to 'Yes' branch, you want to put the union emails of the two arrays into a new array variable, or turning to 'No' branch to exclude the old email address from the new email address.

    vyetonggumsft_6-1713928507480.png

    My Flow:

    vyetonggumsft_7-1713928556708.png

    vyetonggumsft_8-1713928602040.png

     

    item()
    length(body('Filter_array'))

     

    vyetonggumsft_9-1713928614865.png

    Best Regards,

    Sunshine Gu

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard