Hi Everyone,
I am Currently implementing a list using a ODataModel and we need to do a CONTAINS search irrespective of it's case. So in SAPUI5 using ODataModel can we achieve this?
I tried something like this but it doesn't work:
var CategoryName = "Bevera";
var filters =[];
var binding = this.getView().byId("list");
filters.push(new sap.ui.model.Filter("tolower(CategoryName)", sap.ui.model.FilterOperator.Contains, CategoryName.toLowerCase() + ""));
binding.filter(filters);
The resultant URL is something like this:
$filter=(substringof(Bevera,tolower(ZVIGPOIDN___T)))
but I guess it should be
$filter=(substringof(tolower(ZVIGPOIDN___T),'Bevera'))
Is there anything wrong I am doing? or tolower is not supported?
Regards
Vaibhav Surana