I'm making an IT asset list and creating a PowerApp to sort and edit existing list items and add new items to the list.
The Asset Number field in my SharePoint list is Number
BrowseGallery1.Items = SortByColumns(Filter([@'Asset List'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
The items are showing up in the PowerApp, just not sorted by Asset Number as I was hoping.
I also have a TextSearchBox1.Default = " "
It's format is Text
When I enter anything in the Search items field my list goes blank...
Solved! Go to Solution.
If I use this code I can get it to find the Asset Number I input into the "Search items" field:
SortByColumns(Filter([@'Asset List'], StartsWith(Text('Asset Number'), TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
It still does not sort the list by asset number when the "Search items" field is left blank.
So your only issue with this formula is that it doesn't sort, correct?
Please try this to sort by Asset Number:
SortByColumns(Filter(AddColumns('Asset List', "AssetNumberText", Text('Asset Number')), StartsWith(Text('Asset Number'), TextSearchBox1.Text)), "AssetNumberText", If(SortDescending1, Descending, Ascending))
Let me know if this helps.
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.
Doesn't do exactly what I want but it can be remedied by going and making the asset numbers all a five digit number, for example 00056, this is organizing 56 with 562. Thanks for the help Hardit!
Check out new user group experience and if you are a leader please create your group
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.