How to get - TI parameters labels and inputs on run time

Post Reply
Ashleigh W
Posts: 63
Joined: Mon Oct 24, 2016 1:21 pm
OLAP Product: TM1
Version: TM1 Perspectives 10
Excel Version: Excel 2016

How to get - TI parameters labels and inputs on run time

Post by Ashleigh W » Fri Jul 13, 2018 11:43 am

Is there a way or function to dynamically pull all parameters labels and inputs on runtime in TI Process?
For example GetProcessName(0) returns the current process being executed.

User avatar
tomok
MVP
Posts: 2498
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: How to get - TI parameters labels and inputs on run time

Post by tomok » Fri Jul 13, 2018 12:28 pm

Ashleigh W wrote:
Fri Jul 13, 2018 11:43 am
Is there a way or function to dynamically pull all parameters labels and inputs on runtime in TI Process?
For example GetProcessName(0) returns the current process being executed.
I'm not sure what you are asking but you don't need to "pull" the input value to a parameter at runtime, it's going to be stored in the parameter variable. For instance, you could print out the value in a parameter at runtime by putting the following code in your prolog (if the param is string, if it is value you need to wrap in a NumberToString):

Code: Select all

ASCIIOUTPUT('MyFileName', 'The value in pParam1 is' | pParam);
If you are asking if there is a collection you can access to dynamically get a list of the parameters, like VB has collections, then the answer is no.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

Ashleigh W
Posts: 63
Joined: Mon Oct 24, 2016 1:21 pm
OLAP Product: TM1
Version: TM1 Perspectives 10
Excel Version: Excel 2016

Re: How to get - TI parameters labels and inputs on run time

Post by Ashleigh W » Fri Jul 13, 2018 12:46 pm

@tomok, thanks for quick reply.
I have 300+ processes that have multiple parameters (some 2,3 or some 5 or 6) depending on process requriements... I am wanting to include generic code that can store all the parameters passed and the input values to my cube for logging.

Wim Gielis
MVP
Posts: 1829
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0
Excel Version: 2016
Location: Brussels, Belgium
Contact:

Re: How to get - TI parameters labels and inputs on run time

Post by Wim Gielis » Fri Jul 13, 2018 2:30 pm

Hello,

It does not exist.

The only thing you could do is, and it will be not easy and cumbersome too,
is set up a cube containing all processes and their parameter names (in the good sequence).
Then for your generic code, loop over the parameters of the given process (you can do that in the separate cube),
from that cube you retrieve the parameter name, and the Expand function can be used to get the parameter value at run time.

If you look on the forum in the 'Useful code' subforum, you can find code of mine to create and maintain such a cube.

In general, while I see the benefit of the approach, there will be disadvantages too. For one, you need to make sure the second cube is always up to date, with every change in parameters and/or processes.

Wim
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 105 TM1 articles and a lot of custom code
Newest blog article: Looping over input files

Ashleigh W
Posts: 63
Joined: Mon Oct 24, 2016 1:21 pm
OLAP Product: TM1
Version: TM1 Perspectives 10
Excel Version: Excel 2016

Re: How to get - TI parameters labels and inputs on run time

Post by Ashleigh W » Mon Jul 16, 2018 9:34 am

@ Wim Gielis, thanks for your input and suggestions/idea. appreciate your help. :thumbsup:

Post Reply