Forum Discussion
HYPERVELOCITY
Jul 30, 2019Copper Contributor
Please Fix File Sorting by Name in Ms Teams
10 is a bigger number than 9, when sorting files by Name 10 should come after 9...
- Jul 30, 2019They won't, because file names are text fields, no where in history of data types does Text sort 10 in front of 9 when the field is text :). I would say don't put numbers to sort your documents, but because Teams doesn't support metadata yet you can't really get around what you have.
Soon as they release SharePoint file tab, you'll be able to setup a view, and if you have to have a pre-defined sort order you can add a weight or order column that is a number where you can then define order of items in your view.
Trent_Hinkel
Nov 08, 2019Copper Contributor
HYPERVELOCITY The sorting is character by character, so it compares "9" to "1", not "10", because the nine and the one are in the same position within the name. If you put a zero in front of the nine, such as "09" it will sort how you want because the zero will be compared to the one.
Here is an example of how the sorting works:
fileName01.txt
fileName05.txt
fileName07.txt
fileName09.txt
fileName1.txt
fileName10.txt
fileName27.txt
fileName3.txt
fileName50.txt
fileName8.txt
fileName9.txt
For each additional digit in your number length, you would need to pad with another zero.