Hi Paul and Jack,
Thanks for the replies. This is Nick - Ed’s colleague. Just wanted to further explain the issue. See below for the screen with the issue.
As Ed mentioned in his first post, we have a setting in the cube to indicate the current month and year. Below is the code for Current month open for editing
<tm1-ui-dbr tm1-instance="tm1serv"
tm1-cube="System Info"
tm1-elements="MRP Current Month,String"
tm1-read-only="true"
ng-model="page.currentMonthOpen">
</tm1-ui-dbr>
<tm1-ui-dbr tm1-instance="tm1serv"
tm1-cube="System Info"
tm1-elements="MRP Current Year,String"
tm1-read-only="true"
ng-model="page.currentYearOpen">
</tm1-ui-dbr>
On the left side, we have 2 dropdowns called Year and Current Month. Below is the code for those two. Notice the tm1-default-element="{{ page.currYear || page.currentYearOpen }}". This would set the default value to either a previously selected value (pulled from local storage) or if not present, the current year and month from the code above.
<tm1-ui-subnm tm1-instance="tm1serv"
tm1-dimension="Year"
tm1-subset="MRP Years"
tm1-select-only="true"
tm1-default-element="{{ page.currYear || page.currentYearOpen }}"
ng-model="page.currYearSelected">
</tm1-ui-subnm>
<tm1-ui-subnm tm1-instance="tm1serv"
tm1-dimension="Period"
tm1-subset="MRP Months"
tm1-select-only="true"
tm1-default-element="{{ page.currMonth || page.currentMonthOpen }}"
ng-model="page.currMonthSelected">
</tm1-ui-subnm>
Finally, we have the Cost Centre Codes table. Code below.
<table class="table mrp-table">
<tbody>
<tr ng-repeat="costCentreCode in page.costCentreCodes track by $index">
<td class="mrp-text-left" ng-repeat="code in page.codes track by $index">
<tm1-ui-dbr tm1-instance="tm1serv"
tm1-cube="MRP Regional Parameter"
tm1-elements="{{ page.currYearSelected }},{{ page.currMonthSelected }},{{ page.regionSelected }},{{ costCentreCode.key }},{{ code.key }}">
</tm1-ui-dbr>
</td>
</tr>
</tbody>
</table>
Ideally, we would want the inputs under the Cost Centre Codes table to be read-only if the current month and year selected from the dropdowns are not equal to the Current month open for editing. Ed has set up this security in the cube.
In canvas, this only works the first time the page is loaded. See below for screen.
If you change the Month dropdown to Feb (which effectively makes it the current month and year open for editing), the dbrs change to textboxes - which is correct. Now, the issue happens if you try to change it back to Jan. It’s expected to return to the read-only mode but it doesn’t.
Thanks in advance,
Nick