Rebuild Active Form on selection change

Hi All

How can you force an active form to rebuild when a selection changes?

We have an active form where we want the tm1-ui-rpt-row to collapse to different levels based on one of the selections (using ng-if and multiple tm1-ui-rpt-rows). However, the table does not rebuild correctly to take into account the new tm1-ui-rpt-row when the selection changes.

Thanks
David

Hi @anz.fin.all.mailbox,

Could you give more details?

Looking at the Active Form, example, expanding/collapsing the row then changing the selection for the Version will retain the state of the Active form but will also update the values corresponding to the currently selected Version.

Is that what you were looking for?


Paul

Hi Paul

Thanks for your reply.

There is some manual code here so please forgive me, I know it can be done better and hopefully will at some stage in the future.

We have a selection for a dimension:

    <div class="row">
      <div class="col-md-3">Plant </div>
      <div class="col-md-3"><tm1-ui-subnm tm1-instance="veolia" tm1-dimension="WAS Plant" tm1-select-only="true" tm1-attribute="EN Code and Name" tm1-subset="WAS Plants" tm1-default-element="{{defaults.plant}}" ng-model="selections.plant"></tm1-ui-subnm> </div>
      <div class="col-md-6"> </div>
    </div>

Which I would then like to update the tm1-collapse statement as follows:

<tm1-ui-rpt-row ng-if="selections.plant=='NSW'" tm1-dimension="WAS Route" tm1-mdx="{ TM1DRILLDOWNMEMBER( {[WAS Route].[NSW]} , ALL , RECURSIVE ) }" tm1-attribute="EN Code and Name" tm1-collapse-elements="1200,1210,1213,1220,1240,1241,1261,1266"></tm1-ui-rpt-row>
<tm1-ui-rpt-row ng-if="selections.plant=='VIC'" tm1-dimension="WAS Route" tm1-mdx="{ TM1DRILLDOWNMEMBER( {[WAS Route].[VIC]} , ALL , RECURSIVE ) }" tm1-attribute="EN Code and Name" tm1-collapse-elements="1309,1310,1311,1320,1324,1330,1335,1339,1341,1342"></tm1-ui-rpt-row>

It seems that the active form only updates correctly for every second selection, it doesn’t update it correctly for the first selection (if that makes sense?).

Thanks
David

Hi @anz.fin.all.mailbox,

No worries there! Looking at the codes you have posted, the utilization of the active form was catering for a different scenario. Those attributes (tm1-collapse-elements) for example, were meant to be a one time initialization and is not really switching between the two because of the earlier collapse elements were initialized already.

Please contact your local Cubewise office, to help you submit a request for enhancement on that. We will assess and take a look into it.


Paul