on 2017 Mar 20 9:14 AM
Hello Folks,
I am trying to pass filters in bindElement method of a view as shown in blow code. This does not work. And also, in the parameters, it accepts only expand and select. Could you please let me know how to pass the filters.
this.getView().bindElement({
path: sObjectPath,
parameters: {
expand: sExpand
},
filters: [new sap.ui.model.Filter(sFieldName, "EQ", sValue)],
events: {
change: this._onBindingChange.bind(this),
dataRequested: function() { },
dataReceived: function(oData) { }
} });
Best Regards
Srini
Request clarification before answering.
By Looking into the documentation, it looks like $filter is supported only with OData V4 model.
For V2, I would suggest trying to put it in the URL itself. (path)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bindElement is used for binding one entry of an entity using the keys for that entity. This should always return only one record!
if you want to use filtering on a list you have to use binding aggregation as described here: https://sapui5.hana.ondemand.com/sdk/#/topic/ec79a5d5918f4f7f9cbc2150e66778cc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
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.