NumberToString converts a value to a string in a TI Process. It is very similar to the “TEXT” function in Excel.
If you are looking for the command to convert a string to a number in a TI, please see the StringToNumber function.
Syntax
The syntax is:
NumberToString (Value);
where the value is currently stored as a numeric field.
Usage of NumberToString
An example is:
sNumber = NumberToString (50);
This will insert the string ’50’ into the string variable sNumber. From here you can do treat it as text for the rest of your TI.
A great use of this is when testing a TI script or when exporting data from TM1 to a text file, as it can be combined with an AsciiOutput to export variables or data to a text file (you can’t export a number in a text file, it needs to be converted to a string first).
Another example would be to concatenate it with other text to create a longer piece of text that contains what was originally a number.
Notes and Alternatives
This function can be used in TM1 Turbo Integrator Processes only.
To convert Numbers to Strings in Rules, please see the STR function.
You can convert Strings to Numbers in TI processes, please see StringToNumber.
Finally, to convert Strings to Numbers in Rules, please use the NUMBR function.