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 / Filter Gallery by Uniq...
Power Apps
Answered

Filter Gallery by Unique Person name after Multi-filters

(0) ShareShare
ReportReport
Posted on by 18

I’m working to build an approval panel where I have an approval list in SharePoint. As output, I made a Gallery to read the approvals for the request. The issue here is that each approver has more than one approval for the same request because of the return of the request from other approvers.

In the following ss of the SharePoint list:

AnasAllahim_2-1692175435614.png

 

And here is an example of the output gallery:

AnasAllahim_1-1692175200710.png

 

The filter of the gallery is as follows:

 

 

 

 Sort(
 Filter(
 Filter(
 Approvals,
 Parent_ID = varRecord.ID
 ),
 "SpecificWord" in Title
 ),
 Created,
 SortOrder.Ascending
 )

 

 

 

I’m trying to avoid repeating the approver's name here. So, for each box in the gallery, only one unique name.

I spend days trying to use filter/distinct/first in many ways without success.

 

Your support is much appreciated.

Thank you,

Categories:
I have the same question (0)
  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @AnasAllahim,

    Do you want to display the approver's unique name in gallery?

    You can use the following expression.

     

     Sort(
     GroupBy(
     Filter(
     Approvals,
     Parent_ID = varRecord.ID,
     "SpecificWord" in Title
     ),"{Approver}","col"
     ),
     Created,
     SortOrder.Ascending
     )

     

     

    Best Regards,

    Kyrie

  • AnasAllahim Profile Picture
    18 on at

    Thank you @v-mingkz-msft 

     

    There are two issues here. The first one is the app doesn't recognize the approver as follows:

    AnasAllahim_0-1692182663550.png

    The settings of the SP field are as follows:

    AnasAllahim_1-1692182766994.png

     

    The other issue is that even if I replace the approver field with another one like this code

    GroupBy(
     Filter(
     Approvals,
     Parent_ID = varRecord.ID,
     "Dir" in Title
     ),"Completed","col"
    )

    it gives only one field 

    AnasAllahim_2-1692183049322.png

     

    Thank you

     

     

  • AnasAllahim Profile Picture
    18 on at

    Your support is highly appreciated 

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @AnasAllahim, thank you for your message.

     

    Approver will most likely be a person column - which GroupBy does not accept as a parameter type. The workaround would be adding a column displaying the person's name and grouping by that newly created column:

     

    GroupBy(
     AddColumns(
     Sort(
     Filter(
     Filter(
     Approvals,
     Parent_ID = varRecord.ID
     ),
     "SpecificWord" in Title
     ),
     Created,
     SortOrder.Ascending
     ),
     "ApproverName",
     Approver.DisplayName
     ),
     "ApproverName",
     "GroupedApprovals"
    )

    Since 'in' is a non-delegable operator for SharePoint I would advise to keep the nested filter structure.

     

    All grouped records and their column are accessible via GroupedApprovals. For columns that are similar across the approvals use First(GroupedApprovals).ColumnName

     

    Should you want to concatenate column values use: Concat(GroupedApprovals, ColumnName, ", ")

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • AnasAllahim Profile Picture
    18 on at

    @LaurensM Thank you very much.

     

    Work like a charm.

     

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
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard