Typically, you want to keep data types consistent. Text in a text control or indicator, boolean in a boolean, and numbers in a numeric. If you want the same container for everything, you need to cast your data to a string or variant and convert it back to the right data type later.
Of course you could use a plain string for everything, by e.g. writing text directly, your numbers as decimal formatted strings, and your booleans as "TRUE" of "FALSE" strings, for example.
It is not entirely clear what you want. What do you mean by "it does not work"? What is "it"?
Maybe you should explain what you want to do in more general terms.