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 Apps
Suggested Answer

Sorting a gallery

(1) ShareShare
ReportReport
Posted on by 6
I have a power app screen with gallery displaying records from a SharePoint list, the items property has the following filter logic, I would like to sort the records descending by ID number, could some one help me and updating the below logic to apply sorting please.
 
 
If(
    varTabSelected = 3,
   Filter( HelpDesk,Gallery3_1.Selected.Value="Open" && Status.Value <> "Resolved" && Status.Value <> "Cancelled" && Status.Value <> "Rejected" ||Gallery3_1.Selected.Value="All"  || Status.Value = Gallery3_1.Selected.Value),
   //Filter( HelpDesk,Gallery3_1.Selected.Value="Open" && Status.Value <> "Resolved" && Status.Value <> "Cancelled" || Status.Value = Gallery3_1.Selected.Value),
   //Filter( HelpDesk,Gallery3_1.Selected.Value="All",Priority.Value = "High" && Status.Value <> "Resolved"||( Status.Value = Gallery3_1.Selected.Value && Priority.Value = "High" && Status.Value <> "Resolved")  ),
   Filter( HelpDesk,Gallery3_1.Selected.Value="Open",Priority.Value = "High" && Status.Value <> "Resolved" && Status.Value <> "Cancelled" && Status.Value <> "Rejected" )
)
 
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
    Hi try this
     
    SortByColumns(
    If(
        varTabSelected = 3,
       Filter( HelpDesk,Gallery3_1.Selected.Value="Open" && Status.Value <> "Resolved" && Status.Value <> "Cancelled" && Status.Value <> "Rejected" ||Gallery3_1.Selected.Value="All"  || Status.Value = Gallery3_1.Selected.Value),
       Filter( HelpDesk,Gallery3_1.Selected.Value="Open",Priority.Value = "High" && Status.Value <> "Resolved" && Status.Value <> "Cancelled" && Status.Value <> "Rejected" )
    ),
    "ID", SortOrder.Descending)
     
     
    And I removed your comment out code, so hopefully i didnt miss anything
     
     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard