OK. I have solved the issue but I’m posting the code to assist others. My issue was using value instead of Value. Case sensitive issue with JavaScript.
Here is the code designed to return the ‘Description’ attribute of an element.
$tm1Ui.attributeGet('MinePhysicals', 'measure_costing_schedules', $scope.selections.measure1, 'Description').then(function(data){
$scope.selections.temp = data.Value;
console.debug('Returned by this function - %o', data);
console.log($scope.selections.temp);
});
This runs and I can dump the data object returned. See below
FormatString :"#,##0;(#,##0)"
FormattedValue: "Volume BCM"
HasDrillthrough :false
Ordinal :0
Status :"Data"
Value : "Volume BCM"
id :"d3154cdb-2708-93ed-ada8-72da5e406dbf"
isAnnotated :false
isConsolidated :false
isReadOnly : false
odataId :"DZ1wZWgFAICMAAAg"
statusCode : 201
I also dump the $scope value to the console and it shows the data.Value or ‘Volume BCM’.