Skip to Content
Nov 23, 2020 at 08:58 PM

SAPUI5 Filters


hi all,

i have developed a simple on SAPUI5. Data is coming from ES5 Gateway system. This app has to show the salesorder<a href="/storage/temp/1865562-output.png">output.png</a>numbers and Customers and need to filter based on Given customer. Filter Operator is not working properly. For Example if SAP Is given as customer it is showing the first 5 records instead of showing the 5 records that has SAP as customer.using the liveChange event on searchfield

onSearch: function(oEvent){
		var sSearchValue = oEvent.getSource().getValue(), 
		//	var sSearchValue = oEvent.getParameter("Value"),
			aFilters = []; 
			if(sSearchValue.length > 0){
				var oFilterName = new Filter("CustomerName", sap.ui.model.FilterOperator.Contains, sSearchValue); 
				var oFilterID = new Filter("SalesOrderID", sap.ui.model.FilterOperator.Contains, sSearchValue);
				aFilters.push(new Filter({filters:[oFilterID,oFilterName], And:false}));


output.png (39.6 kB)
codeinview.txt (1.5 kB)