cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidvo68
Helper II
Helper II

How to detect and template fill duplicated items from a gallery

Hello all,

One of my gallery in my app has many duplicated records and I like to know how can I filter/search these duplicates and when found, mark them using template fill property.  

Duplicate record is defined if record/s has the same identical entry for the below columns, except for score column which is not blank.

Data source: SP List, Name: 'Triaged Review List'

ProgramID-- type number

QuestionNumber-- type number

Member-- type single line of text and using User().FullName

Score-- type choice.  

If you look at the image below, row # 3,4, and 5 are considered duplicated records.

davidvo68_0-1656345887298.png

Here is the code that I have so far for my detect duplicates button onselect property.

I am looking for help to modify the code in order to detect and template fill the duplicated records. 

Again, the code below is not complete and I need help to modify it.

If(CountIf(AddColumns(GroupBy('Triaged Review List',"ProgramID" ,"DupGroup"), "DupCount", CountRows(DupGroup)), DupCount>1)>0,
Notify("Duplicates Found") );

Thank you.

1 REPLY 1
Drrickryp
Super User
Super User

@davidvo68 

For the Template fill property

With(
    {
     tbl: GroupBy(
               AddColumns(
                         'Triaged Review List',
                         "chk",Concatenate(
                                          ProgramID,
                                          QuestionNumber',
                                          Member)
                                 )
                  ), "chk","otherstuff"
             )
    },
    If(
        CountRows(tbl.otherstuff) > 1,
        Red,
        Transparent
    )
)

 

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,218)