Can use variable in TI Variable Name?
Posted: Tue Aug 01, 2017 10:22 am
Hi guys,
I'm import a .csv file to TM1 cube with TI. The file format is attached.
From column F to column Q which highlighted with yellow are product list. I don't want to hardcode each product code in TI, and want to set a loop in the TI code.
vColumnIndex =6;
while(vColumnIndex<=17);
vtypeclass = 'vColumn'|NumbertoString(vColumnIndex);
if(DIMIX('product','vColumn'|NumbertoString(vColumnIndex)) = 0);
ASCIIOutPut('c:\test.txt', vtypeclass );
ENDIF;
vColumnIndex = vColumnIndex + 1;
end;
But the output file only show "vColumn6",ideally I hope it can output column6 value 'A111'. TI consider variable vtypeclass as string,
vtypeclass = 'vColumn6'.
How can I change the vtypeclass value, and use it as variableName? Many thanks.
wendywang
I'm import a .csv file to TM1 cube with TI. The file format is attached.
From column F to column Q which highlighted with yellow are product list. I don't want to hardcode each product code in TI, and want to set a loop in the TI code.
vColumnIndex =6;
while(vColumnIndex<=17);
vtypeclass = 'vColumn'|NumbertoString(vColumnIndex);
if(DIMIX('product','vColumn'|NumbertoString(vColumnIndex)) = 0);
ASCIIOutPut('c:\test.txt', vtypeclass );
ENDIF;
vColumnIndex = vColumnIndex + 1;
end;
But the output file only show "vColumn6",ideally I hope it can output column6 value 'A111'. TI consider variable vtypeclass as string,
vtypeclass = 'vColumn6'.
How can I change the vtypeclass value, and use it as variableName? Many thanks.
wendywang