Skip to Content

Fiori List report - Case insensitive Filter bar

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 ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 07 at 10:55 PM

    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

    Add comment
    10|10000 characters needed characters exceeded