Hi All
I have a simple table set up with pagination and zero suppression. It works fine on initial load of the page, showing the first 10 records, with a total of 94 pages. However, after changing a cost center selection, instead of refreshing the table and showing the first 10 records for the new selection, it seems to keep the table as is (still with 94 pages), but only display the records for the new selection. So, if the new selection doesn’t have any records in the first 10, then the table shows up as blank, and you have to page through to find some records.
How can I get the table to fully reload itself after changing a selection?
Here is the table html code:
[CODE]
<tm1-ui-element-list tm1-instance="veolia" tm1-dimension="FUE Driver Name" tm1-mdx="{TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [FUE Driver Name] )}, 0)}, ASC)}" attributres="EN Name" ng-model="lists.driver">
</tm1-ui-element-list>
<div class="col-md-12">
<table class="table table-striped">
<thead>
<tr>
<th class="text-center"> Driver </th>
<th class="text-center"> Total {{selections.year}} </th>
<th class="text-center" ng-repeat="month in lists.month"> {{month.alias}} </th>
</tr>
</thead>
<tbody>
<tr ng-show="driver.value!='0'" ng-repeat="driver in table.data()">
<td>
<tm1-ui-element-list-item tm1-item="driver" tm1-item-display="{{driver.key}}">
</tm1-ui-element-list-item>
</td>
<td class="text-right">
<tm1-ui-dbr tm1-instance="veolia" tm1-cube="FUE Fuel Reporting" tm1-elements='"FIN Total Year {{selections.year}}","{{selections.costcenter}}","{{driver.key}}","Total FUE Product","{{selections.measure}}","Base Period","Base Units"' tm1-data-decimal="0" ng-model="driver.value">
</tm1-ui-dbr>
</td>
<td class="text-right" ng-repeat="month in lists.month">
<tm1-ui-dbr tm1-instance="veolia" tm1-cube="FUE Fuel Reporting" tm1-elements='"{{month.key}}","{{selections.costcenter}}","{{driver.key}}","Total FUE Product","{{selections.measure}}","Base Period","Base Units"' tm1-data-decimal="0" ng-model="driver[month.alias]">
</tm1-ui-dbr>
</td>
</tr>
</tbody>
</table>
[/CODE]
And here is the javascript:
$scope.lists = {
driver: []
};
$scope.table = $tm1Ui.tableCreate($scope.lists.driver, {pageSize:10, preload:false});
Many thanks
David