Page 1 of 1

Expand Function Help....

Posted: Thu Feb 26, 2015 6:44 pm
by smehnert
Hi all

I am in earnest trying to use the EXAND function to take in from a CSV file the parameters of the function I am trying to commit;

for example;

DimensionElementComponentAdd(EXPAND ('%vParameters%'));

In this instance vParameters is read from the file and contains 'DimName','ConsolidatElName','ELementName',1

I have also tried

DimensionElementInsert(EXPAND (''%' | vParameters | '%')); and every other variation of the above :?:

Is it not possible to read the whole contenets of the function from a file???

Regards
SMehnert

Re: Expand Function Help....

Posted: Thu Feb 26, 2015 7:15 pm
by tomok
smehnert wrote:Is it not possible to read the whole contenets of the function from a file???
I've never tried what you are suggesting but I'm going to have to so no. The problem is that the single quote (') and comma (,) that are part of your string are not a parameter but rather are delimiters being used by TM1 as part of the function. I don't think you can combine the delimiter and parameter inside the same EXPAND function. You're going to have to EXPAND each individual parameter and then concatenate the appropriate delimiters.

Re: Expand Function Help....

Posted: Fri Feb 27, 2015 6:44 pm
by Wim Gielis
Hello smehnert,

No, that is not possible with EXPAND. You can have a look at my website for a recent article where EXPAND was used (and works :-) )

If it were possible to do this, we would be able to use EXPAND for example for a CellPutN to a cube - irrespective the number of dimensions. Too bad, this idea won't work in practice.