Skip to Content
avatar image
Former Member

Count from OData Illuminator Services in SAPUI5

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers