Roland
June 22, 2017, 6:00am
1
I’m issuing the following REST request to the server:
PATCH http://win5778-eappl:19503/api/v1/Cellsets(‘33SHq2sYAIAGAAAg’)/Cells HTTP/1.1
Payload:
[{ "Ordinal": 0, "Value": "0"}, { "Ordinal": 1, "Value": "1"}, { "Ordinal": 2, "Value": "2"}]
Response from server:
{"error":{"code":"","message":"SystemValueInvalid"}}
So what is wrong?
plim
June 22, 2017, 6:20am
2
Hi @Roland ,
Any particular reason why you would go through the above?
If you are looking for ways to save multiple values into TM1, there is an existing function in $tm1Ui that can help you on this already:
$tm1Ui.cellsetPut(cellPutRequests);
Here is an example:
var cellPutRequests = [
{value:'2017', instance:'dev', cube:'System Info', cubeElements:['Financial Year', 'String']}
, {value:'2017', instance:'dev', cube:'System Info', cubeElements:['Budget Base Year', 'String']}
];
$tm1Ui.cellsetPut(cellPutRequests).then(function(result){
if(result.success){
// successfully saved - do more
}
});
–
Paul
Roland
June 22, 2017, 6:23am
3
Hi @plim I’m calling this from Java, not javascript.
Did you try to run this in Postman?
Check the Cellset and make sure there are those three cells you are trying to update.
GET /api/v1/Cellsets(‘33SHq2sYAIAGAAAg’)/Cells
Roland
June 22, 2017, 8:05am
5
The problem was that in the MDX used to select the cellset I didn’t define a ROWS
axis and instead put the ROWS
expression in the WHERE
clause. You need to have COLUMNS
and ROWS
in the MDX
that requests the CellSet.
SELECT
XXX ON COLUMNS,
XYZ ON ROWS
FROM CUBE
WHERE ...
1 Like