Cell Type is Real weirdness
Posted: Wed Mar 04, 2020 12:58 pm
Hi,
I have a process with the following logic on the Prolog:
The above errors with the message Cell Type is Real. This doesn't surprise me because vDay element is actually Simple.
Also the Asciioutput doesn't execute.
Here comes the weirdness:
If in the above code I insert the following code before vDay the cell Type is real error still happens but the Aciioutput now executes!
So it now ignores the second vDay variable declaration. I presume this is related to the fact that you can't change the data type of a varibale in TM1 but this seems like weird behaviour.
Does anyone have an explanation as to what is going on?
I have a process with the following logic on the Prolog:
Code: Select all
vAdminCube = 'Admin Cube';
vDay = cellgets(vAdminCube, 'Actuals', 'Current Year', 'Day');
sFile='C:Path\testday.txt';
If( vDay @= '03' );
Asciioutput(sFile, 'Test Output');
Endif;
Also the Asciioutput doesn't execute.
Here comes the weirdness:
If in the above code I insert the following code before vDay the cell Type is real error still happens but the Aciioutput now executes!
Code: Select all
nSerialNow = NOW;
vTimeStamp= TimSt (nSerialNow, '\Y\m\d\h\i\s');
vDay=subst(vTimeStamp,7,2);
vAdminCube = 'Admin Cube';
vDay = cellgets(vAdminCube, 'Actuals', 'Current Year', 'Day');
sFile='C:Path\testday.txt';
If( vDay @= '03' );
Asciioutput(sFile, 'Test Output');
Endif;
Does anyone have an explanation as to what is going on?