cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable SAPUI5 Table Sorting with non case sensitive?

Jayakrishnan
Active Participant
0 Kudos
1,329

Hi All,

I am working in custom sapui5 application development. In my application i am using sap.ui.table to display the collection data from the OData Service.

I have one column called description in my sap.ui.table. I enabled the sorting feature for that particular column by adding the sortProperty ={description} .

The OData Service implementation is implemented in a direct binding approach(with CDS). SO no manual implementation added in the gate way method level.

When we are checking the sorting functionality it is perfectly worked , if all the description values are created either small letters or capital letters.

Example:

But if user created the description in mixed characters (camel case), the sorting works in a different way. First it sort all the capital letters and then it does for the small letters.

when i tested the same in the Gateway Client, there also i am getting the response like this only for the camel letters.

/sap/opu/odata/sap/ZTEST_SRV/GroupSet?$orderby=Description desc

As an additional check we created new property in the OData Model level (Not in DDIC Table) and converted it to lower cases before sending into Get EntitySet. then we tried the same OrderBy query for the new property also. it also not working.

Is this the standard way of sorting the OrderBy query in the Gateway? Or should we mention anything additionally in the backend or frontend? Pleas help me to sort it out.

Thanks ,

Regards,

Jayakrishnan

Accepted Solutions (0)

Answers (1)

Answers (1)

ThorstenHoefer
Active Contributor
0 Kudos

Hi,

please consider to sort by an additional column by converting the column to lower or upper case.

Example:

select lower(month) as sort_month
from ...

Regards

Thorsten