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 Automate
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

Categories:
I have the same question (0)
  • Mister_Shaik Profile Picture
    1,008 on at

    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

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard