I am attempting to automate a data load of curves into my model, which has potentially hundreds of columns of data.
Aside from initial data points, the naming convention TI has selected works for me ; eg Coll1 Coll2 .. Coll500 etc.
The cube I am loading to has a dimension with '1','2' .. etc.
For each curve, I was planning on looping through the dimension (1 to 500) and using the loop to determine the column to load from.
However, its not letting me do this, and errors at the point whereby I check the logical value of nInputColl
Is there any way to get TI to dynamically reference variables like what I am attempting to do?
Code: Select all
#Need to loop through the Collection Period Lines
X = 1;
#There are 780 columns in the data extract that could be populated, but 'only' 500 Durations in collection period.
While( X <= 500);
sInputColl = 'Coll' | numbertostring(X);
nInputColl = sInputColl;
##ERRORS HERE##
IF ( nInputColl <> 0);
vIFRS9 = 'Performing';
if(CellIsUpdateable(pCubeTemplate,pVersion,sTermName,vNetGrossMetric,vIFRS9, numbertostring(X))=1);
CellPutN(nInputColl,pCubeTemplate,pVersion,sTermName,vNetGrossMetric,vIFRS9,numbertostring(X));
Endif;
vIFRS9 = 'Under Performing';
if(CellIsUpdateable(pCubeTemplate,pVersion,sTermName,vNetGrossMetric,vIFRS9, numbertostring(X))=1);
CellPutN(nInputColl,pCubeTemplate,pVersion,sTermName,vNetGrossMetric,vIFRS9, numbertostring(X));
Endif;
vIFRS9 = 'Not Performing';
if(CellIsUpdateable(pCubeTemplate,pVersion,sTermName,vNetGrossMetric,vIFRS9, numbertostring(X))=1);
CellPutN(nInputColl,pCubeTemplate,pVersion,sTermName,vNetGrossMetric,vIFRS9, numbertostring(X));
Endif;
Endif;
X = X +1 ;
End;