Sort order not working on Swedish characters

Sort order not working on Swedish characters

Sorting is not working with Swedish Characters.
Surely I must have missed something.

I can not get any data sorted correctly with regards to the Swedish characters ÅÄÖ and åäö.

Å is treated as A
Ä is treated as A
Ö is treated as O

å is treated as a
ä is treated as a
ö is treated as o

A and a are the first characters in the Swedish Alphabeth
ÅÄÖ and åäö are the last characters in the Swedish Alphabeth

Tried both Import from Excel and created new by GUI same issue
Here is another screenshot of another sample from the GUI sortorder issue
Hi Tommy,

Make sure you use the System action SetCurrentLocale with locale "sv-SE" (Swedish) before sorting. The sorting is handled by the underlying .NET or Java platform, which know how to sort in Swedish, but if you don't tell them you want Swedish collation, they use the default instead.

EDIT: I see you mean sorting in an Aggregate, sorry, I assumed you were sorting using SortRecordList or the like. I'm not sure what happens in the database, you'd have to ask your DBA.
I'm guessing your database is case insensitive and accent insensitive correct?

If so that is the expected behaviour, that is not a problem of the UI, it's the outcome of the database query

Best regards,
Pedro has the right answer... by default, OutSystems uses an accent insensitive, case insensitve collation.

It's the right choice in most situations, but in some it isn't right. :(

Thanx for the anwers. I am using the Outsystem cloud platform with the default provided database, It is hard to tell how the DB is set up and configured. Tested with testing the currentlocale and using another query but it does not help. Tried other variants same issue.

Really annoying that Outsystems has the same issue as the Zoho platform for default handling of international characters.

This "for me not so good sorted" list - is it possible to do a function to call a method providing it with a parameter to sort it with character set in mind ? How to I programaticly force the sort of the list better ?

Hi Tommy,

Assuming you're on SQL Server, a bit of Googling found me the answer. See here for the COLLATE keyword, and here for the right collation name. This query:

select code from(
select 'a' as code
union all
select 'ä'
union all
select 'z') T
order by code collate  Finnish_Swedish_CI_AS desc

produces this output:


Which I think is what you want. Of course this isn't ideal, as you'll have to add it after each query you want to sort on text, but it gets you there.

I think it would be a good idea for OutSystems to consider a better international support. E.g. using decimal commas and easily use dates other than yyyy-mm-dd are still a big pain, and collation only adds to the trouble...

Thanx Killian I really appreciate your proposal for a workaround. I will try it. Thanx
I agree with Kilian that collations and regional settings can be a pain in the arse, but you can always can create the database where the platform is installed in the correct collation, even in the Outsystems cloud you can probably ask support to create the DB with the correct settings for your case (probably not in the free version)

Best regards,