Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

Remove duplicates in subgrid or custom view

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Team,

I am new to the power apps. I was checking if is there any way to avoid duplicate records in power apps subgrid or in a custom view?

 

I have a records something like below:

Id   Name

1    foo

1    foo

2    bar

2    bar

 

expected result in subgrid\custom view:

1 foo

2 bar

 

Please let me know if need any additional details. I appreciate the help.

  • Verified answer
    pallavigade Profile Picture
    Microsoft Employee on at
    Re: Remove duplicates in subgrid or custom view

    Thanks everyone for your views, I kind of mitigated it my creating a separate entity with unique values. Creating a custom number attribute might work too

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Remove duplicates in subgrid or custom view

    Hi @pallavigade,

    You can create one custom number attribute in your sub-grid entity. When any new record is added or created, assign incremental number to custom number attribute. now for sub-grid view add filter to show only records with custom attribute number =1.

    So if you have 2 records with same contact, department, project & task,then custom number values will be like 1 & 2, and you are going to show only 1 record based on filter.

     

  • soundharya Profile Picture
    249 on at
    Re: Remove duplicates in subgrid or custom view

    Distinct(Tablename, columnname)

  • Christian Leverenz Profile Picture
    1,214 on at
    Re: Remove duplicates in subgrid or custom view

    @pallavigade ,

    the data in the subgrid (well, in every list) is the data from the dataverse. So, when the records are doubled it means, that you have them twice in the table (with diffrent guids).

    Usually i highly recommend to avoid that kind of scenarios in the data as nobody will be able to distinguish between the right and wrong entry. So, this would mean that this is a problem of the business process within the crm/dataverse and should be revisited/clarified.

     

    You could get this also by for example selecting the names and ids from a salesorderdetail and show the information about the salesorder (or whatever master-detail relation you have). In this case think about showing the data from the master table and not from the details table.

     

    You could try to add a "distinct" option in the fetch (i think, this is not possible by standard custimizing, but not sure). But this only helps, if the resultentries are really the same.

     

    If all else fails you could consider rendering the data on your own by for example creating a pcf for that (did not explore this option, just thought about it 🙂 ) or by creating a custom pagetemplate which renders things lik,me you want.

     

    So, no real answer, may be you post a little bit more about the challenge 🙂

     

    A happy new year to you,

      Christian

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35