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
Unanswered

Sort Column

(0) ShareShare
ReportReport
Posted on by 76

Hi folks,

Hope you all are doing well. I have created an app and work perfectly until I noticed one of the column is not sorted ascending. Here is what I have. Two drop down boxes for users to filter what they need and a gallery that displays name, rank, title, location and phone number. This is connected to the sharepoint list. The code for gallery on the Items properties are as follows:

If(DDTitle.Selected.Result = "All" And DDLocation.Selected.Result = "All", 'Emergency Call Out List',
DDTitle.Selected.Result = "All" And DDLocation.Selected.Result <> "All",
Filter('Emergency Call Out List',Location =DDLocation.Selected.Result),
DDTitle.Selected.Result<> "All" And DDLocation.Selected.Result = "All",
Filter('Emergency Call Out List',EE_Title=DDTitle.Selected.Result),
DDTitle.Selected.Result<>"All" And DDLocation.Selected.Result<>"All",
Filter('Emergency Call Out List',EE_Title=DDTitle.Selected.Result And Location =
DDLocation.Selected.Result)

 

The rank is number 1,2,3,4.... On my sharepoint, I have sorted it ascending and I thought it will automatically sorted on the apps but apparently, it's not. I have tried the SortbyColumns but didn't work.

 

Can someone help me please? Thank you.

Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @ypurcaro ,

    You did not state your sort field, but you can condense all of your code to this

    Sort(
     Filter(
     'Emergency Call Out List',
     (
     DDTitle.Selected.Result = "All" ||
     EE_Title=DDTitle.Selected.Result 
     ) &&
     (
     DDLocation.Selected.Result = "All" ||
     Location = DDLocation.Selected.Result
     ),
     YourSortField
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • ypurcaro Profile Picture
    76 on at

    Thank you Warren but it doesn't work. 

    My sort column is Rank. 

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @ypurcaro .

    "Doesn't work" does not really help me - the code is valid structure - what is not working and what type of field is Rank ?

  • ypurcaro Profile Picture
    76 on at

    Hi Warren, I got this resolved. I need the "SortbyColumns" function. The Rank is number. At the bottom, I had the SortOrderAscending. 

    Thanks again.

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 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard