- $tm1.processExecute (instance, name, parameters)
- $tm1.choreExecute(instance, name)
- $tm1.instances()
- $tm1.instance(name, reload, dontLoadObjects)
- $tm1.cubeDimensions(instance, cube)
- Other: $tm1.cellUpdate(value, instance, cube) $tm1.resultsetTransform(instance, cube, result, userOptions) $tm1.cellsetDelete(instance, id)
May 2, 2018
Using the $tm1 service
In the $tm1 service there are 5 functions which you could use when builing your plugins.
$tm1.processExecute (instance, name, parameters)
$tm1.processExecute enables you to run a TM1 process.
$scope.executeProcess = function (name) { $tm1.processExecute($scope.instance, name);};
To call the function in the template.html, you just need to use ng-click and call the new function:
ng-click="executeProcess(selections.process)"
$tm1.choreExecute(instance, name)
$tm1.choreExecute enables you to run a chore.
$scope.executeChore = function (name) { $tm1.choreExecute($scope.instance, name);};
To call the function in the template.html, you just need to use
ng-click="executeChore(selections.chore)"
$tm1.instances()
$tm1.instances will enable you to get information about all available instances:
$scope.getInstances = function () { $tm1.instances().then(function (data) { $scope.lists.instances = data; });};
$tm1.instance(name, reload, dontLoadObjects)
$tm1.instance will give you information about a specific instance:
$scope.getInstance = function (name) { $scope.options.showInstanceInfo = !$scope.options.showInstanceInfo; $tm1.instance(name).then(function (data) { $scope.lists.instanceData = data; });};
$tm1.cubeDimensions(instance, cube)
$tm1.cubeDimensions will give you the list of dimensions for a specific cube:
$scope.getCubeDimensions = function (cube) { $tm1.cubeDimensions($scope.instance, cube).then(function (data) { $scope.lists.dimensions = data; });};