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.
BrowseScreen1 Fields:
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.
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.
Thanks!
Hardit Bhatia
https://thepoweraddict.com
My columns are Asset Number and User. I modified and used the code like below and it's still not working...
SortByColumns(Filter([@'Asset List'], StartsWith('Asset Number', Value(TextSearchBox1.Text))), "User", If(SortDescending1, Descending, Ascending))
I get 5 errors:
1. Invalid argument type (Number). Expecting a Text value instead.
2. Invalid argument type (Number). Expecting a Text value instead.
3. The function 'Starts With' has some invalid arguments.
4. The function 'SortByColumns' has some invalid arguments.
5. Cannot sort on the expression type.
This isn't working either... Hmm
1. Name isnt valid. This identifier isn't recognized. This error appears most commonly when a formula refers to something that no longer exists (for example, a control that you've deleted).
2. The function 'AddColumns' has some invalid arguments.
3. The function 'SortByColumns' has some invalid arguments.
4. Cannot sort on the expression type.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
198 | |
178 | |
64 | |
34 | |
32 |
User | Count |
---|---|
340 | |
273 | |
116 | |
73 | |
57 |