sap.ui.model.FilterOperator.NE is not working
Hi, While using the table binding filter, all the operators were working except Not Equal to i.e., sap.ui.model.FilterOperator.NE Please check the sample here - http://output.jsbin.com/wigisi , code - http://jsbin.com/wigisi/edit?html,js Testing Steps -
- Two tables placed, left side Header Data and right side Item Data.
- Both the tables have Tracking Number column.
- Now on click of Mis-Match button placed down the table, I have to filter the item data tracking number field values which are not matching with header data tracking number field values.
- If I use sap.ui.model.FilterOperator.EQ it gives the matched values, but if I use sap.ui.model.FilterOperator.NE it doesn't fetch the unmatched values.
- All the FilterOperators are working fine except NE.
Just to add on, I have pointed to SAPUI5 hana cloud version as well, even there it is not working. Please check into the issue and do the needful.
Thank you & Best Regards, Sai Vellanki.
Hello Sai,
by default if you combine many filters together, they are logically grouped with OR, that makes sense when you do the EQ filter but not for the NE filter where you have to use AND.
I modified the jsbin sample for you with a new syntax and now it should work: http://jsbin.com/lucodurucu/edit?html,js,output
You basically have to create a composite filter and define the logical operator: new sap.ui.model.Filter({ filters: arrayOfFilters, and: true })
Cheers,
Michael
Apologies for raising this as a issue. Thank you Michael! :-)