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 / Show duplicate records...
Power Apps
Answered

Show duplicate records in the gallery

(1) ShareShare
ReportReport
Posted on by 516

Hi Team, 

 

I am looking in previous discussion the forum regarding how to display duplicate data (Ex: PONumber) in the gallery but i cannot find any ideas. It sounds like simple but i cannot make it work. Can anybody help me on how to display duplicate PO number in a gallery? 

 

I just needed to identify or ONLY SHOW duplicate records in gallery. My table is in sharepoint list (tblData)

 

Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @echodapogi 

    Without any further details on what you have data-wise, the general concept is this in your Items property of a Gallery:

    Filter(
     GroupBy(yourDataSource,
     "PONumber", "_data"
     ),
     CountRows(_data)>1
    )

    This would return a table of any PONumber's that are duplicated.

     

    I hope this is helpful for you.

  • echodapogi Profile Picture
    516 on at

    Thanks Randy. 

  • Krzysztof Borkowski Profile Picture
    Microsoft Employee on at

    1. Put your data into a collection and load to a gallery as items. E.g. ClearCollect(colPOnumbers, tblData)
    2. Set TemplateFill of your Gallery so if Title column has your PONumber it will count if it exists more than once and marks it as Red : If(CountRows(Filter(colPOnumbers, Title = ThisItem.Title))>1, Red, White)
    3. You can use GroupBy(colPOnumbers, "Title", "myData") on the gallery Items property to see only once the highlighted duplicate. 

    4. Add a Text Label into the first record of your gallery, Text property: concat(ThisItem.myData, Text(ID), ", ") to see which records have duplicated PONumber. 
    5. You can finally filter those records which has more than 1 row. Filter(GroupBy(colPOnumber, "Title", "myData"), CountRows(myData) > 1 ) 

  • echodapogi Profile Picture
    516 on at

    Thanks Kristóf.

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

    @Kristóf 

    A collection??  Why duplicate all the data records into app memory?? Plus you would then need to continuously re-collect the records into the collection if you plan to make any changes to the list in which you want to reflect those changes in the gallery.  Lot's of app performance issues there.

     

  • Krzysztof Borkowski Profile Picture
    Microsoft Employee on at

    Great call out @RandyHayes You are right. 

    100GIF.gif

  • MihirL Profile Picture
    8 on at

    I have same issue but in my case I have multiple entities like Email, Employee Name, Contact Number, Employee ID
    Please suggest

     

  • MihirL Profile Picture
    8 on at

    I have same issue but in my case I have multiple entities like Email, Employee Name, Contact Number, Employee ID
    Please suggest

  • MihirL Profile Picture
    8 on at

    I have same issue but in my case I have multiple entities like Email, Employee Name, Contact Number, Employee ID
    Please suggest

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard