Skip to Content

Filter works with Mock Data but not with OData


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.


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"); },
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers