I have sap.ui.Tableone that shows a list of entries. I want to get the number of records in the data.
I read the SAP UI 5 post on how to print a common table row , but that didn't help me.
This is the code for the table (the code for the columns has been removed to make the message smaller):
<table:Table id="PickRecs" visibleRowCount="10" selectionMode="MultiToggle" visible="true" rows="{/downRecs}" >
<table:title>
<txt:Text text="{
path: '/downRecs',
formatter: 'Formatter.totalFormatter'
}">
</txt:Text>
<Label text="possible records to export"></Label>
</table:title>
<table:columns>
.......
</table:columns>
</table:Table>
This is formatter.js:
totalFormatter:function(results) {
return results.length;
}
I would like to show how many rows are in the table, using an array downRecsas the source of all the records. For example: 3 possible reports for export.
This value may vary depending on some input fields on the screen, for example, they may choose to view all records for a product or only records for a specific client, etc.
? .