Hi Experts,
I am trying to do the data binding using filters with multiple values.
ex: I am selecting the multiple values from list dialog and those i want to pass to odata service as a filters.
name : abc
pqr
I am looping on above and pushing it to array of filters.
jQuery.sap.require("sap.ui.model.FilterOperator");
var FilterOperator = sap.ui.model.FilterOperator;
var filtersTerr = new Array();
for(i=0;i<name.length;i++){
filterName = new sap.ui.model.Filter("FirstName", sap.ui.model.FilterOperator.EQ, name[i]);
filter.push(filterName );
}
this..getBinding("items").filter([filter],false);
Final filter should be something $filter=FirstName='abc' or FirstName='pqr'.
I have already looked into below discussions but somehow came to conclusion that array cannot be use with OR/AND.
http://scn.sap.com/thread/3462246
http://scn.sap.com/thread/3560814
Please let me know how this needs to be written.
Thanks,
Rahul