Page 1 of 1

Generic TI-process

Posted: Thu Nov 01, 2012 7:58 pm
by TM1Ship
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?

Re: Generic TI-process

Posted: Thu Nov 01, 2012 8:32 pm
by Duncan P
Could you be seeing the effect of this http://www.tm1forum.com/viewtopic.php?f=18&t=5284?

If either of your cubes has been reordered it may be your problem.

You may also be interested in the TI system variables NValue, SValue and Value_Is_String which you will find here http://publib.boulder.ibm.com/infocente ... 80019.html.

Re: Generic TI-process

Posted: Fri Nov 02, 2012 3:21 pm
by mattgoff
Sounds exactly like the dim reorder bug. Take a look in your .pro file and compare it to this. Might work as a fix for you.

Matt