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 choice not working
Power Apps
Unanswered

Sort choice not working

(0) ShareShare
ReportReport
Posted on by 318

I would like to be able to SORT my columns that have the choices/dropdown type fields but I am having an issue below.

 

WITHOUT SORT FILTER :

genarich_3-1637210951298.png

 

WITH SORT :  (ISSUE)

genarich_1-1637210884836.pnggenarich_4-1637211047194.png

 

 

Currently, I have it in the Items property that when the user clicks on the Sort icon- the Switch function below will trigger and fire off the correct sorting sequence. I have sorted other fields as well that involved normal text fields using SortByColumns function. These two were combined in one chunk of code in the Items property. 

Switch( 
"OrderStatus",
 Sort(
 Search(
 Filter(
 col_YQQ,
 If(
 Gallery1.Selected.Filter = "ALL OPEN ORDERS",
 Status.Value <> "Completed",
 If(
 Gallery1.Selected.Filter = "NOT STARTED/ BLOCKED",
 Status.Value = "Not started" || Status.Value = "Blocked",
 If(
 Gallery1.Selected.Filter = "NO/ SHORT STOCK",
 Status.Value <> "Completed" || 'In Stock?'.Value = Blank()),
 If(
 Gallery1.Selected.Filter = "EDD UNKNOWN",
 Status.Value <> "Completed" && IsBlank(EDD),
 If(
 Gallery1.Selected.Filter = "EDD THIS MONTH",
 Status.Value <> "Completed" && Month(EDD) = Month(Now()),
 (Status.Value = "Ready for pick up" || Status.Value = "Partially completed")
 )
 )
 )
 )
 )
 ),
 TextInput12_5.Text,
 "Part_x0023_Requested",
 "Part_x0020__x0020_Description_x0",
 "ReasonforRequest",
 "Sales_x0020_order",
 "Owner",
 "PurchaseOrder",
 "Tracking_x0020_ref",
 "ReasonfornoEDD",
 "Issued_x0020_to",
 "RequestedBy",
 "Notes"
 ),
 "OrderStatus",
 If(
 varSortDirection = Ascending,
 Ascending,
 Descending
 )
 )

 

Icon property of image-icon.

If(
 varSortColumn <> "OrderStatus",
 Icon.Sort,
 If(
 varSortDirection = Ascending,
 Icon.ArrowUp,
 Icon.ArrowDown
 )
)

 

 

Categories:
I have the same question (0)

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard