cancel
Showing results for 
Search instead for 
Did you mean: 

Filter error in oData model read from service

0 Kudos

Hello.

I have defined a filter for a oData model. It checks whether the value of an input field (name) is contained within the filterable field of the model (Name2).

filnam = new sap.ui.model.Filter("Name2", sap.ui.model.FilterOperator.Contains, name.getValue(),"");

The read is executed afterwards storing the resulting records in a table

oModel.read("/ClientCollectionSet", {
					filters: filnam,
					method: "GET",
					success: function(oData) {
						var data = {
							"Row": oData.results
						};
						oJsonModel.setData(data);
						oJsonModel.setSizeLimit(500);
						var tbl = oView.byId("table2");
						tbl.setModel(oJsonModel);
						tbl.bindRows("/Row", tbl.getRows()[0].clone());
					},
					error: function() {}
				});

The model is declared this way

var oModel = new sap.ui.model.odata.ODataModel(odataUrl, false, false, false, {});

If I execute the read without filters it works OK, but with the filter it gives me this error.

Thank you in advance for any suggestion.

Accepted Solutions (0)

Answers (0)