How to sort table column combination of lower & upper case letters in Reactive App
Application Type
Reactive

Hi Team,

I want to sort a table records by each column, I implemented the dynamic sorting.
When I make the sorting the one with lower case get at the final, lower case letters were not being a part of sorting.
How can I achieve this, Any suggestion ?

Example:

Now the table column Interface Name is sort as Decreasing but the record "fa" was not included in the sorting.

Any Suggestion to resolve this.

Thanks In Advance
-Palle Vijay Bhaskar Reddy

Hi Vijay,

I've never seen this type of problem with sorting using dynamic sort.

Are you sure you are applying it correctly, can you share an oml demonstrating the problem.  

Are you sure you are using the correct tablesort string and using it as first sort column in your aggregate ?

Dorine

Sorry I can't share the OML.

Similar post link : https://www.outsystems.com/forums/discussion/49462/how-to-sort-with-case-insensitive/

But I didn't did any explicitly, I used scaffolding to create sorting and Table.

And one thing is that Data I'm using and inserting is of External Database ORACLE.

- Palle Vijay Bhaskar Reddy

Ok, 

In case of external this might be happening. 

I think on outsystems application entities, collation is case insensitive by default, but in external databases another choice could have been made.

Maybe you can experiment with adding UPPER() or an explicit COLLATE section while building your TableSort string.

I´ m not sure the latter would even work, never tried it.

Dorine

yes, I tried by using upper(tablesort).

even it didn't worked.

another idea might be to add a calculated column to your aggregate with formula ToUpper(Entity.Attribute), and set that new calculated column as the Sort Attribute of your header cell in your UI.

Dorine

If I add it to the header cell by using the function ToUpper(Entity.attribute).

I'm getting this error while trying to add the newly created column as sort attribute.

Any suggestions ?

- Palle Vijay Bhaskar Reddy

I mean 

* adding ToUpper(attribute) as an extra calculated column of the aggregate

* choosing that calculated column as your sort attribute

Is that what you did ?  Can you show screenprints ?  Can you share what error details you get in service studio ?


Yes did the same which you mentioned Dorine.

- Palle Vijay Bhaskar Reddy

Hi Forum,

There is nothing to do in Outsystems, The issue is of External database which I'm using.

Same there as well when I executed a query for Sorting with ASC and DESC happening the same, It was not considering the lower case letters while doing the sorting.

- Palle Vijay Bhaskar Reddy

Did you add a COLLATE to you sql order by clause.  It should be possible to override like that

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.