cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori List report - Case insensitive Filter bar

former_member289890
Participant
0 Kudos

Hi -

I have Fiori template based List report with XSODATA based oData service and have a filter bar with text filter ( Example - Customer Name).

Problem is filter is case sensitive and does not return results unless the exact text is typed in which is poor user experience.

Is there a way we can make filter bar case insensitive? any trick that may work on xs odata side or any API reference can be used in list report extensions ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tanveer,

HANA will issue a EQ statement on the field. So this has to be exact criterion. I couldn't find any xsodata definition parameter that would control/change this EQ to CONTAINS statements against the database source. So you will need to create an extension on the controller for the List Report and implement/change the filter that is being set before the odata service is called via controller method onSearch.

You could do it like:

var oFilter = new Filter("CustomerName", FilterOperator.Contains, sQuery);
this._oTable.getBinding("items").filter([oFilter]);  

Here are the docs for the Filter.

Another workaround is to change the query string to uppercase before it gets to be sent as query string to the odata.

Regards,
Ivan

Kishannaicker
Participant
0 Kudos

Hi Tanveer,

With reference to above answer from Ivan, you can refer this blog for more clarification on how to change query string before sending it to oData call : case-insensitive-filters-in-fiori-elements-list-report-cap

Regards,

Kishan