on 2018 Mar 11 6:33 PM
Hi brother, i'm trying to do a count after applying a filter, but it always returns the total value of the rows, can you help?
http://server:port/XMII/IlluminatorOData/Rowset(QueryTemplate='query',RowsetId=1)/Row/$count?$filter=UnitsInStock%20eq%201
// Create an object of filters
this._mFilters = {"inStock": [new sap.ui.model.Filter("UnitsInStock", "EQ", 1)];
// read the count for the unitsInStock filter
this.getModel().read("/Rowset(QueryTemplate=\'query\',RowsetId=1)/Row/$count", {
success: function (oData) {
oViewModel.setProperty("/inStock", oData);
},
filters: this._mFilters.inStock
});
Always returns total rows, instead of count the result with the filter.
Thanks
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.