CellPutN erase other elements value
Posted: Fri Aug 28, 2020 3:26 am
Hi all,
I'd like to transfer, say two Account figures from one scenario to another.
in Prolog, the Account view already limited to
Then in Data, it is even as-if hardcoded to limit to write into these two account only. However after running the process, all other Accounts figures are cleared, except the two Accounts figures remain. I am confused because isn't CellPutN will only affect the intersection of all dimension only? Thank you very much
I'd like to transfer, say two Account figures from one scenario to another.
in Prolog, the Account view already limited to
Code: Select all
#Account
sDim = cDimAccount;
If (SubsetExists(sDim, cSub) = 0);
SubsetCreate(sDim, cSub);
Endif;
SubsetDeleteAllElements(sDim, cSub);
SubsetElementInsert(sDim, cSub, cAccount1, 1);
SubsetElementInsert(sDim, cSub, cAccount2, 2);
ViewSubsetAssign(cCube, cViewSource, sDim, cSub);
Code: Select all
If (vAccount @= cAccount1);
If (CellIsUpdateable(cCube, cTargetScenario, 'WIP', ..., vMonth, ..., cAccount1, vMeasure) = 1);
CellPutN(vValue, cCube, cTargetScenario, 'WIP', ..., vMonth, ..., cAccount1, vMeasure) ;
Endif;
Itemskip;
Endif;
If (vAccount @= cAccount2);
If (CellIsUpdateable(cCube, cTargetScenario, 'WIP', ..., vMonth, ..., cAccount2, vMeasure) = 1);
CellPutN(vValue, cCube, cTargetScenario, 'WIP', ..., vMonth, ..., cAccount2, vMeasure) ;
Endif;
Itemskip;
Endif;