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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to compare two col...
Power Apps
Answered

How to compare two collection records, if identical or not.

(0) ShareShare
ReportReport
Posted on by 3,347

I need to compare two records.  If one is the same as the other.  Resulting in true/false.  Any ideas?

Categories:
  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    HI @martinav ,

    If you are looking for any identical records in the collection, I suggest you GroupBy the collection by all fields you want to compare (with Data as the last grouped field) and then look for groups where CountRows(Data) > 1

    If you are wanting to compare two specific records, it would be the "long way" I would think (each field equalling)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

  • martinav Profile Picture
    3,347 on at

    I ended up doing nested if() statements.  Same thing, but different.  I was hoping for a full record compare method.

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @martinav 

    Keep in mind the JSON function as well.  It is handy for record to record comparison. 

    i.e. in general:

    If(JSON(originalRecord) = JSON(otherRecord, 
     //records are equal,
     //records are not equal
    )

     

    I hope this is helpful for you.

  • martinavi Profile Picture
    8 on at

    Oh, now this is much more like it!!  Good one, @RandyHayes 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @martinav 

    It's a good one, but it is only valid in behavioral actions since JSON only works in those actions.

    It would be nice to use it for a property, but that is not an option.  For that, you have to do it long hand.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard