cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dev
Level: Powered On

Sort list by alphabetically

Hello, 

 

I have made a sharepoint list and added 70 items in that list now i am creating an app in powerapp by retriving the data from the sharepoint online list. The problem i am figuring out is my user want the app information list to be alphabetically order. But i am getting the information in any order. i have used this formula on my gallery : 
SortByColumns(Filter('School Info', StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

 

CAN ANYONE PLEASE HELP ME ?

10 REPLIES 10
Anonymous
Not applicable

Re: Sort list by alphabetically

The forumla looks to be setup correctly, what is not working? Do you get an error? Show us the screenshot of the list. This formula is from the "Generate App from Data" did you do this? Did you remove the sort button? Error might be there because the variable SortDescending1 is never set.

mr-dang
Level 10

Re: Sort list by alphabetically

SortByColumns(
    Filter('School Info', 
        StartsWith(Title, TextSearchBox1.Text)
    ), 
"Title", If(SortDescending1, Descending, Ascending)
)

My guess is that your Title column is numerical, which is making it sort by the left-most digit. Can you check what it is validated for?

Microsoft Employee
@8bitclassroom
Dev
Level: Powered On

Re: Sort list by alphabetically

Yes, I have made the sort icon set the property visible to false and its function is : UpdateContext({SortDescending1: !SortDescending1})

 

 

 

 powerapps.PNG

Dev
Level: Powered On

Re: Sort list by alphabetically

Hello , 

 

I have not made the sort visible as it was not in my use any way. My purpose that the user look the schools alphabetically and can search for the school from the seacrh label. But i want that the school name is east oro high school but if the user types oro in search label it should show them the east oro high school. so not only like "STARTSWITH" but I need all  the alphabets of "TITLE" to be displayed.

Anonymous
Not applicable

Re: Sort list by alphabetically

Not sure I understand what you are looking form. But if you are looking to search "Title" column with any word not only the first word use Search instead of Filter + StartsWith

 

SortByColumns(
  Search('School Info', TextSearchBox1.Text,"Title"),
  "Title", 
  If(SortDescending1, Descending, Ascending)
)
Dev
Level: Powered On

Re: Sort list by alphabetically

I cannot use "SEARCH " as i saw online in one of the documentation if i am retrievieng information from the sharepoint list then the search function doesnot support the function in the powerapps. I will not give an error but the blue dot will come and it will work but only partial like it will search the schools but not with what i am looking for the same way as before.

Highlighted
Dev
Level: Powered On

Re: Sort list by alphabetically

I cannot use "SEARCH " as i saw online in one of the documentation if i am retrievieng information from the sharepoint list then the search function doesnot support the function in the powerapps. I will not give an error but the blue dot will come and it will work but only partial like it will search the schools but not with what i am looking for the same way as before.

Anonymous
Not applicable

Re: Sort list by alphabetically

Where did you read it?

 

Here on the Filter, Search and Lookup documentation I cannot find anything what you are claiming. Filter and Search work in similar ways with delegation so it does not matter which one you are using.

Dev
Level: Powered On

Re: Sort list by alphabetically

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 152 members 5,279 guests
Please welcome our newest community members: