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 News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,170)