Use page filter selection in CellGet/CellPut in JS


Hi all,
One question about relation between html and js file with CellPut and CellGet functions.

I would like to use the page filter ng-model from a ui-tm1-subnm as part of my slider function in the js file, but I do not know how to make it.

HTML File codes:

  <div class="col-md-2">               
      <div class="input-group">
           <span class="input-group-addon" id="basic-addon1"><i class="fa fa-globe"></i></span>
                  <div style="font-family: Segoe UI; font-size:11pt; font-style:normal">                     
                                        tm1-subset="All Members"

In my js file, here is the code where I need to replace ‘Russia’ by ng-model selection

app.controller('sliderCtrl', ['$scope', '$rootScope', '$log', '$tm1Ui', function ($scope, $rootScope, $log, $tm1Ui) {
$tm1Ui.cellGet('dev', 'Channel Share', 'E-commerce', 'Scenario 1', 'Russia', 'Change in Share').then(function (data) {
        var value;
        $scope.slider = {
            value: value,
            options: {
                showSelectionBar: true,
                floor: 0,
                ceil: 10000,
                step: 0.1,
                translate: function(value) {
      return accounting.formatNumber(value/100, 2, ".", ",") + '%';
    $scope.$on("slideEnded", function () {
        var samevalue = $scope.slider.value / 10000;
        samevalue = '0,' + samevalue;
        console.debug('value| ' + samevalue);
        $tm1Ui.cellPut(samevalue, 'dev', 'Channel Share', 'E-commerce', 'Scenario 1', 'Russia', 'Change in Share');

I’ve tried this, but it doesn’t work:

$tm1Ui.cellGet('dev', 'Channel Share', 'E-commerce', 'Scenario 1', $, 'Change in Share').then(function (data) {

Any idea ?
Thanks for your help.


Hi @sschreurs,

Note that: the JS file loads first before the HTML.

So this means that at the time the cellGet ran, the $ will not work (I imagine that there is an error in the console saying something like ‘undefined’).

Try this out:

In the JS, initialize the variable by putting this just before the above codes:

$ = {
Zone: ‘Russia’

Then in the HTML, change the attribute into:


Let me know how it goes.



Hi Paul,

Yes it works.
Thanks for your help !