on 02-02-2018 1:26 AM
Hi,
I am searching a table based on the input from the user. I'm having trouble with filtering the oData but this works when using mock data. The mock data ends up displaying only the rows that contain the search input but the oData ends up removing all the rows completly. The metadata is the same on both.
Thanks
searchID: function(oEvt) {
// add filter for search
var aFilters = [];
var sQuery = oEvt.getSource().getValue().toString().toUpperCase();
if (sQuery && sQuery.length > 0) {
var filter = new Filter("ID", sap.ui.model.FilterOperator.Contains, sQuery);
aFilters.push(filter);}
// update list binding
var list = this.getView().byId("Table");
var binding = list.getBinding("items");
binding.filter(aFilters, "Application");
},
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.