Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Unanswered

Comparing 2 Arrays

(0) ShareShare
ReportReport
Posted on by 12

Hello

 

I have created a flow that generates two array outputs, im trying to compare them and if they are the same I wish to update a sharepoint list item. Basically is "Array 1" equal to "Array 2" (the listed items can also be in a different order),  So far all i can find are methods to compare and then create a list of what the differences are ?

 

Cheers

  • Mister_Shaik Profile Picture
    1,006 on at
    Re: Comparing 2 Arrays

    Hi @fosso ,

     

    A simpler way to do this would be to use the "intersection" expression to create an array with common elements between two arrays, then we can compare the length of the generated array - if the generated array length is equal to the length of either array - then both arrays have same elements!

     

    Here's a breakdown of the if conditions,

    If,

    1. Length of two arrays should be equal

    2. Length of the intersection of arrays is equal to the length of either array

    then

    Both arrays are the same!

    else

    Both arrays are different!

    1. Condition.PNG

     

    Hope this helps 🙂


    Kind Regards,

    Shaik Sha
    ________________________________________________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1