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 / Sort and filter galler...
Power Apps
Answered

Sort and filter gallery by user email and status column

(0) ShareShare
ReportReport
Posted on by 42

I have a gallery that filter user by their email,

and I need to add a filter in the same gallery to filter by status column from the drop-down box .

so please how could I add more than one filter in my gallery and sort() function in the same time

as the below screenshot I need to filter by user email and status column inside the sort() function

Rapikur__0-1688915707302.png

Rapikur__1-1688915733000.png

 

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Rapikur_,

     

    Your current filter is not actually filtering the data source. You will have to add the column that has to be filtered by User().Email.

     

    Below I have made a few adjustments:

    With(
     {wUserEmail: User().Email},
     Sort(
     Filter(
     peminjaman,
     //Example column would be 'Created By'.Email
     EmailColumn = wUserEmail,
     //Should the status column be a TEXT column use StatusColumn = StatusDropdown.Selected.Value
     StatusColumn = StatusDropdown.Selected
     ),
     Created,
     SortOrder.Descending
     )
    )

     

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

    Thanks!

  • Rapikur_ Profile Picture
    42 on at

    and how i can show all the data if i choose 'all' in the dropdown status coloumn

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Rapikur_,

     

    The StatusColumn filter will look as follows (adjust in the code above):

    StatusDropdown.Selected.Value = "all" || StatusColumn = StatusDropdown.Selected

     

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

    Thanks!

  • Rapikur_ Profile Picture
    42 on at

    its getting error

    Rapikur__0-1688926255792.png

    Rapikur__1-1688926284447.png

     

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

    Hi @Rapikur_,

     

    Thank you for the screenshot. It's very close to the solution, you will need the following Filter & Sort:

    With(
     {wUserEmail: User().Email},
     Sort(
     Filter(
     peminjaman,
     EmailColumn = wUserEmail,
     Dropdown1.Selected.Value = "Semua Status" || Status = Dropdown1.Selected.Value
     ),
     Created,
     SortOrder.Descending
     )
    )

    In the example above, you will only have to adjust the 'EmailColumn' to the correct column name in which the email is stored.

     

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

    Thanks!

  • Rapikur_ Profile Picture
    42 on at

    i've been try that code but still getting error

    Rapikur__0-1688929007568.png

    and didn't show the data

  • LaurensM Profile Picture
    12,516 Moderator on at

    What particular part of the code is causing issues? (red underlined)

  • Rapikur_ Profile Picture
    42 on at

    Rapikur__0-1688929588631.png

     

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

    @Rapikur_,

     

    Your current status condition is invalid, the first 'Status =' has to be removed. The condition should look as follows:

    Dropdown1.Selected.Value = "Semua Status" || Status = Dropdown1.Selected.Value

     

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

    Thanks!

  • Rapikur_ Profile Picture
    42 on at

    my bad...thanks bro

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard