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 entries by status...
Power Apps
Unanswered

Sort entries by status - how?

(0) ShareShare
ReportReport
Posted on by 775

Hi all,

I have a short question regarding the filter function.

 

I have built an app where on the home page all requests can be filtered by status. If I click on "All", all applications appear and that is correct. But now I want that when I click on the button "By status" (marked red in the pic) also all appeared but sorted. That means, first all with the status "Beantragt", then "Genehmigt", then "Abgelehnt" and then "Storniert". What is the best way to filter or rather sort them in this order?

 

PowerSm_0-1628071543044.png

 

Thanks in advance

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Do this for all buttons:

    Beantragt's Button OnClick

    Set(varFilter,"Beantragt")

     

     

    On your gallery item property:

    SortByColumn(Filter(ListName,Status.Value=varFilter),"Status",Ascending)

  • PowerSäm Profile Picture
    775 on at

    Thanks for your quick reply, @zmansuri.


    Unfortunately it does not work. But in itself I have already set everything.

     

    In the "Nach Status" button for filtering it says:
    Set(varFilter; "Nach Status").

     

    And in the Gallery I have written this:
    If(varFilter = "By Status"; true; Status.Value=varFilter).

     

    This all works as well. But now all entries are displayed and not sorted by status. How can I define that they have to be sorted by "Beantragt", "Genehmigt", "Abgelehnt", "Storniert"?

     

    Thanks in advance

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    On the gallery use this filter:

     

    If(varFilter = "By Status"; true;  Sort(Gallery; NachStatus; Ascending))

    This will organize all your itens by alphabetical order 

     

     

     

     

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

     "Beantragt", then "Genehmigt", then "Abgelehnt" and then "Storniert"

     if this are all status values then it will sort this column like this:

     

    Abgelehnt

    Beantragt

    Genehmigt

    Storniert

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    SortByColumn(Filter(AddColumn(ListName,"StatusTxt",Status.Value),Status.Value=varFilter),"StatusTxt",Ascending)

     

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
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard