cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

SortByColumn Formula

Hi All,

 

Currently, I'm having some troubles incorporating the SortByColumns formula to my PowerApps.

 

In my PowerApps, I have the filter gallery & search. (Please see screenshot)

 

PowerApps.PNG

 

For my filter gallery (Resolved, Active) here's the onselect formula:

If(
ThisItem.Title="Active",
UpdateContext({type : "Active"}),
ThisItem.Title = "Resolved",
UpdateContext({type : "Resolved"})
)

 

For my Browse Gallery here's the onselect formula:

Filter(
'M365 Service Health',StartsWith(Title,TextSearchBox1.Text),
If(
type = "Active" || type = "Resolved",
type in M365_Status2
))

 

I tried below formula for my browse gallery but it didnt work:

SortByColumns(Filter(
'M365 Service Health',StartsWith(Title,TextSearchBox1.Text),
If(
type = "Active" || type = "Resolved",
type in M365_Status2
)),
If(SortDescending1, Descending, Ascending))

 

Any one can assist me on this? Thank you so much

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

The Column to sort on is not indicated:

SortByColumns(Filter(
'M365 Service Health',StartsWith(Title,TextSearchBox1.Text),If(type = "Active" || type = "Resolved",
type in M365_Status2
)), "ColumnToSort",
If(SortDescending1, Descending, Ascending))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

The Column to sort on is not indicated:

SortByColumns(Filter(
'M365 Service Health',StartsWith(Title,TextSearchBox1.Text),If(type = "Active" || type = "Resolved",
type in M365_Status2
)), "ColumnToSort",
If(SortDescending1, Descending, Ascending))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Highlighted

Hi @eka24 

 

Thank you so much. 🙂 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,791)