Refresh a Specific Active Form

Hi All

We have a page with multiple tabs. On one of the tabs we have an active form. On this tab also is an option to add data that should then appear in the active form (via a tm1-ui-process directive).

The question is, how can we get the specific active form only to refresh automatically after the process has been run? We don’t want to use the “tm1-refresh-page” option as that refreshes the whole page and returns the user back to the default tab, which is not the one this active form appears on.

Thanks
David

@anz.fin.all.mailbox,

Hey David,

How is your active form built, does it include tm1-ui-dbr statements?

If so, you can use the tm1-refresh-group tag of the tm1-ui-dbr directive, and then use the tm1-after-run tag of the tm1-ui-process directive to call a function that just refreshes the data in the active form:

 <tm1-ui-dbr
   tm1-instance="my-tm1-instance"
   tm1-cube="my-cube"
   tm1-elements="Element1,Element2,Element3"
   tm1-refresh-group="my-active-form">
</tm1-ui-dbr>

<tm1-ui-process
       tm1-instance="my-tm1-instance"
       tm1-name="my-process"
       tm1-after-run="refreshActiveForm('my-active-form')">
</tm1-ui-process>

Then in your controller for the page, create a function like this:

$scope.refreshActiveForm = function(groupName){ 
      $tm1Ui.dataRefresh(groupName);
};

Jack

1 Like

Hi Jack

Thanks for your reply. We aren’t using dbrs but the various rpt directives per the Canvas sample. However, your note about the function pointed me in the right direction. By passing the table id to the function it gives the same result, the active form only is updated!

Thanks heaps
David