on 2020 Nov 11 3:53 PM
Request clarification before answering.
Hi
According to https://ui5.sap.com/#/topic/6c47b2b39db9404582994070ec3d57a2%23loioadd47c3966dd40489e952bb4f5f74a7c method getProperty does not trigger real data reading. Before call this method you should call read method as in https://ui5.sap.com/#/topic/6c47b2b39db9404582994070ec3d57a2#loioff667e12b8714f3595e68f3e7c0e7a14sec...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use this snippet to get the bound data for the whole table.
if you're using sap.m.Table, change the aggregation binding "rows" with "items". it should work also.
oTable.getBinding("rows").getAllCurrentContexts().map(row => { return row.getObject() } )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
onInit: function () {
var sUrl = "/northwind";
var oModel = new sap.ui.model.odata.v2.ODataModel(sUrl);
oModel.read("/PurchaseOrderSet", {
success: function (data, response) {
console.log(data);
},
error: function (error) {
var errorCode = error.statusCode;
var status = error.statusText;
MessageBox.error(errorCode + ":" + status);
}
});
this.getView().setModel(oModel);
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nadya
Thanks - but i must have been un-precise: case is that i already have read data from the backend. No problem there.
But i have a function where i need to use some data from the data fetched. Basically i need the value of some fields in the PurchaseOrderSet (like Purchase Order Number and other things) to use them for other things.
| User | Count |
|---|---|
| 18 | |
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.