I was wondering, is there any way to sort galleries, dropdowns etc... by numerical order? In an app that I am building, I have a list of "teams" basically. In my share point, they are listed like so : "Team n°: 1 - [Team Name]". I want to display all the teams in numerical order so Team n°1 first then 2,3,4.... Everything is good from 1 to 9 but when you get to ten, it does not work anymore.
It displays 1,10,11,12...19,2,21... you get the idea.
Is there a way around this?
Your gallery displays in the order 1,10,11,12...19,2,21... because TeamNumber is a Text column.
You could make a Gallery with Teams as the datasource and input the following code into the Items property to convert TeamNumber to a Number type value on the fly.
The problem with this formula is wrapping TeamNumber in the Value formula gives a delegation warning. This will only work up to 500 lines in the Teams table.
Therefore, the only real way to solve this is to change the TeamNumber column to a Number column rather than a Text column in your datasource.
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."
I know it is a text column so I made another column with jsut the numbers and I wanted to sort my text team column taking into account the number column it is related to but does not seems to work.
SortByColumns(Distinct('Tableau de bord ST_1';'Lots concernés');"Result"). This is what I typed but I can only chose result at the end and not the number column
So I cannot do distinct and sort by another column ?
The problem I have is I dont want do change the column type to number because then it wont display the team names just numbers, isnt it?
Hi @Devildez ,
Do you want to sort a text type columns based on the number inside it?
I suggest you try AddColumns function to shape tables( not affect the original data).
Try this formula:
Substitute(teams,"Team n°: 1 - [",""),
In the formula, I create a new field that only records the team number.
And then, sort the new table based on the number field.
Here's a doc about shaping table for your reference:
Here's a doc about formatting text(in this example is replacing "Team n°: 1 - [...]" with "") for your reference:
I tried your strategies but it seems I cannot pull it off, it won't sort the way I want. So I just put away the number idea.
Sorry for the inconvenience, thank you for the help anyways
First let me say that I am a "BRAND NEW" user to PowerApps so please be patient with me. I have read through the comments and don't quiet understand all of the technical explanations given, so I have attached an image of what I need help on.
I have a PowerApp tied to a Sharepoint list. My list is organized by an Activity number. I want my PowerApp to sort the items by this number. I have two questions: First, Can this be done?, and Secondly can someone explain it in a way that a very new user can understand.
Thanks in advance for any help.
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand