cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatrikB
New Member

Sort order with Scandinavian characters

I'm trying to sort a menu in Power Apps were the source is a column in a SharePoint list. The columns holds words with Scandinavian characters like Å, Ä and Ö.  When I use sort function in Power Apps,  "Å" & "Ä" is treated as "A" and "Ö" is treated as "O" meaning that it is not sorted correctly.

 

They should be sorted last in alphabetical order, e.g. U, V, W, X, Y, Z, Å, Ä, Ö

Anyone who know how this could be solved? Is there any language formatting that I could use together with the sort function?

 

Regards

Patrik

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @PatrikB :

Please try:

Sort(
  Choices(YourSPList.TheChoicesColumn),
  LookUp(
     SortIndex,
     Value=First(Split(Value,"")).Result
  ).No
)

Best Regards,

Bof

View solution in original post

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @PatrikB :

My idea is to manually create a sort index,some thing like:

ClearCollect(
    SortIndex,
    {Value:"A",No:1},
    {Value:"B",No:2},
    {Value:"C",No:3},
    {Value:"D",No:4},
    {Value:"E",No:5},
    {Value:"F",No:6},
    {Value:"G",No:7},
    {Value:"H",No:8},
    {Value:"I",No:9},
    {Value:"J",No:10},
    {Value:"K",No:11},
    {Value:"L",No:12},
    {Value:"M",No:13},
    {Value:"N",No:14},
    {Value:"O",No:15},
    {Value:"P",No:16},
    {Value:"Q",No:17},
    {Value:"R",No:18},
    {Value:"S",No:19},
    {Value:"T",No:20},
    {Value:"U",No:21},
    {Value:"V",No:22},
    {Value:"W",No:23},
    {Value:"X",No:24},
    {Value:"Y",No:25},
    {Value:"Z",No:26},
    {Value:"Å",No:27},
    {Value:"Ä",No:28},
    {Value:"Ö",No:29}
)

And then I assume there is a table :

Table({TheValue:"Ådhf"},{TheValue:"Bdfg"},{TheValue:"Ödfgh"})

Now,I can sort this table in this way:

Sort(
  Table({TheValue:"Ådhf"},{TheValue:"Bdfg"},{TheValue:"Ödfgh"}),
  LookUp(
     SortIndex,
     Value=First(Split(TheValue,"")).Result
  ).No
)

vbofengmsft_0-1632110032722.png

Best Regards,

Bof

 

Thanks a lot Bof,

 

I've tried this on my setup but without any success, I forgot to mention that the source in sharepoint is choices, maybe that is why this doesn't work?

 

Current Menu setup is a Gallery:
Items= Sort(Choices("Name of the column in Sharepoint"),ThisRecord.Value,Ascending)

 

Label inside the gallery

Text = ThisItem.Value

 

Any other suggestion?

 

//Patrik

Hi @PatrikB :

Please try:

Sort(
  Choices(YourSPList.TheChoicesColumn),
  LookUp(
     SortIndex,
     Value=First(Split(Value,"")).Result
  ).No
)

Best Regards,

Bof

View solution in original post

Thanks a lot, that worked like a charm, appreciate all your help.

 

//Patrik

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,032)