Generic TI-process
Posted: Thu Nov 01, 2012 7:58 pm
Hi.
I'm trying to make a generic process; meaning I enter(parameters) the name of the cube, versionTo, VersionFrom and Year. This process will copy from one version to another version for a specific year for a certain cube.
In my datasource I choose a view for one the cubes I what to use, for ex CubeX and view Y
In the Variables sheet I have variables V1-V10, all of them String and Other.
In the Prolog I'm build my view to use as a DataSourceCubeView. Since all of my cubes have year and version this is no problem.
In the Data sheet:
For testing I wrote a quick;
IF(pcube @= 'Cube Z');
CellPutN(StringToNumber(V8), pCube, V1, V2, V3, pVersionTo, V5, V6, V7);
ENDIF;
V1-V7 is the order of the dimension where V7 is the measure.
For some reason this doesn't work, it only works when it's written like this;
CellPutN(StringToNumber(V8), pCube, V1, V2, V3, pVersionTo, V5, V4, V6)
But if I change cube in my datasource to Cube Z the CellPutN(StringToNumber(V8), pCube, V1, V2, V3, pVersionTo, V5, V6, V7) works.
This makes it impossible to make a generic TI-process since the order of my variables will never be as the order of my dimension in a cube.
I also tried to use ViewColumnDimensionSet (also ViewRowDimensionSet)with a while-loop so that the order of the columns in the view would be as dimension order of the cube, but this doesn't work either.
What I'm I doing wrong?
I'm trying to make a generic process; meaning I enter(parameters) the name of the cube, versionTo, VersionFrom and Year. This process will copy from one version to another version for a specific year for a certain cube.
In my datasource I choose a view for one the cubes I what to use, for ex CubeX and view Y
In the Variables sheet I have variables V1-V10, all of them String and Other.
In the Prolog I'm build my view to use as a DataSourceCubeView. Since all of my cubes have year and version this is no problem.
In the Data sheet:
For testing I wrote a quick;
IF(pcube @= 'Cube Z');
CellPutN(StringToNumber(V8), pCube, V1, V2, V3, pVersionTo, V5, V6, V7);
ENDIF;
V1-V7 is the order of the dimension where V7 is the measure.
For some reason this doesn't work, it only works when it's written like this;
CellPutN(StringToNumber(V8), pCube, V1, V2, V3, pVersionTo, V5, V4, V6)
But if I change cube in my datasource to Cube Z the CellPutN(StringToNumber(V8), pCube, V1, V2, V3, pVersionTo, V5, V6, V7) works.
This makes it impossible to make a generic TI-process since the order of my variables will never be as the order of my dimension in a cube.
I also tried to use ViewColumnDimensionSet (also ViewRowDimensionSet)with a while-loop so that the order of the columns in the view would be as dimension order of the cube, but this doesn't work either.
What I'm I doing wrong?