cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Sort Gallery by Title

Hi Everyone. I was hoping I could get some help. 

I am trying to sort a Gallery by Title1, this field holds a number in format x.xx. The title field was renamed to room, but I tried both and couldn't get it to work, it just freezes the web app each time I get something wrong. I just want it to sort by Room/title in descending order. 

I thought that I needed the below but I must not understand the way that these are named.

SortByColumns(ListName, "Field_Name").Title 

 

Any help would be awesome.sort.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Try something like this:

SortByColumns([DataSource], "Title1", If(SortDescending1, Descending, Ascending))

If you want to add a filter:

SortByColumns(Filter([DataSource], [Formula]), "Title1", If(SortDescending1, Descending, Ascending)) 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

8 REPLIES 8
Super User
Super User

Try something like this:

SortByColumns([DataSource], "Title1", If(SortDescending1, Descending, Ascending))

If you want to add a filter:

SortByColumns(Filter([DataSource], [Formula]), "Title1", If(SortDescending1, Descending, Ascending)) 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Thanks. It was close, I ended up with the below.

 

SortByColumns([DataSource], "Room", If(SortDescending1, Ascending, Descending))

 

I'm not using a filter, so this made it easier for me. 

 

 

 

 

hi, im new with powerapps... 

 

i need to know where should i put that command above to sort the gallery view display? @UserInterface7 


@UserInterface7 wrote:

Thanks. It was close, I ended up with the below.

 

SortByColumns([DataSource], "Room", If(SortDescending1, Ascending, Descending))

 

I'm not using a filter, so this made it easier for me. 

 

 

 

 


 

@PytByt  Hi, you should past the formula in the formula bar when the item property is selected in the dropdown on the upper lefthand side

@Steven_Sm 

 

you mean item property of the gallery?

Yes, exactly.

It goes into the Items property of the gallery.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

@Steven_Sm  @Jeff_Thorpe 

 

Yes, Thank you.

Helpful resources

Announcements
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,655)