I used the below code to construct an "Array" in TM1. Each run of the While loop takes the variable and adds another value onto it, delimiting it with a ';' to identify the join. The second While loop deconstructs the array.
It was useful for my purposes but I haven't tested the performance or other (ie character?) limitations of this method.
Code: Select all
iCount = 0; iLimit = 10; vArray = ''; WHILE( iCount < iLimit); vValue = Some Calculation or String Manipulation; vArray = vArray | vValue | ';' ; iCount = iCount + 1; END; iCount = 0; iLimit = 10; WHILE( iCount < iLimit); vValue = SUBST( vArray, 1, SCAN( ';', vArray) - 1); vArray = DELET( vArray, 1, SCAN( ';', vArray)); iCount = iCount + 1; END;