Forum Discussion
Sorting a SharePoint List alphabetically it Swedish
Hi!
I'm working on a ShrePoint site for my organisation and have run into an issue with a SharePoint list. The entire site is in Swedish and I've run inte issues when Grouping/Sorting.
In the list i have a column (lets call it "Letter") that uses a formula
=LEFT(Title)
to extract the first letter from the Title of each list item for the purpose of being able to group by letter. So the list is first grouped by "Letter" and the Sorted alphabetically by "Title".
The issue is how SharePoint handles "alphabetical order" of the Swedish alphabet. The Swedish alphabet is the same as English, but with 3 additional letters, "Å", "Ä" and "Ö". While they could be considered A's and O's with diacritics, in Swedish they are considered their own letters. And alphabetically they come after Z.
I want my list sorted "A, B, C, ... X, Y, Z, Å, Ä, Ö", but SharePoint sometimes sorts it "A, Ä, Å, B, ... N, O, Ö, P, Q, ..., X, Y, Z"
The strange thing, however, is that this problem only arises when i load the list on a SharePoint page as a Web part.
So in short: Problem only occurs when grouping or sorting the column "Letter", and i only occurs when using the list in a web part.
Has anyone run into anything similar? I've looked thourgh all the setting i can access for both the site and the list. All Language settings are set to Swedish as well.
Thanks for your input. I went a slightly different direction, but your answer gave me the inspiration needed.
At first I had a similar idea, but I didn't like the idea of replacing the letters, since the whole point of the calculated column is to be able to GROUP by the first letter of the title.
I got inspired by your suggestion however and managed to solve it with the following formula:
=IF( OR( LEFT(Title)="Å"; LEFT(Title)="Ä"; LEFT(Title)="Ö" ); LEFT(Title); CONCATENATE("";LEFT(Title)) )
On line 8 there is a ZeroWidth Space between the quotation marks, which results in the formula adding an invisible space in front of the letter for all letters except Å, Ä, and Ö. When grouping/sorting, spaces and punctuation comes before letters.
2 Replies
- SteveHendyBrass Contributor
AI tells me... You could create a calculated column with a formula like:
=IF(LEFT([Title],1)="Å", "Z1",
IF(LEFT([Title],1)="Ä", "Z2",
IF(LEFT([Title],1)="Ö", "Z3",
LEFT([Title],1))))- This formula assigns "Z1" to Å, "Z2" to Ä, "Z3" to Ö, and otherwise uses the first letter.
- You can then sort by this calculated column to get your desired order.
- PerACopper Contributor
Thanks for your input. I went a slightly different direction, but your answer gave me the inspiration needed.
At first I had a similar idea, but I didn't like the idea of replacing the letters, since the whole point of the calculated column is to be able to GROUP by the first letter of the title.
I got inspired by your suggestion however and managed to solve it with the following formula:
=IF( OR( LEFT(Title)="Å"; LEFT(Title)="Ä"; LEFT(Title)="Ö" ); LEFT(Title); CONCATENATE("";LEFT(Title)) )
On line 8 there is a ZeroWidth Space between the quotation marks, which results in the formula adding an invisible space in front of the letter for all letters except Å, Ä, and Ö. When grouping/sorting, spaces and punctuation comes before letters.