Page 1 of 1

TI Process with Parameters in a Chore

Posted: Wed May 05, 2010 12:45 am
by ExApplix
I have got some TI Process which accept parameters when executed manually. Can I put the same process in the Chores which run overnightly?

If yes then do I have to change anything in my existing Processes (with parameters)?

Please help me in understanding in how these processes will behave if they are in a Chore?

Thanks!

Re: TI Process with Parameters in a Chore

Posted: Wed May 05, 2010 1:04 am
by Alan Kirk
ExApplix wrote:I have got some TI Process which accept parameters when executed manually. Can I put the same process in the Chores which run overnightly?

If yes then do I have to change anything in my existing Processes (with parameters)?

Please help me in understanding in how these processes will behave if they are in a Chore?
When you created the process you would have had to specify default parameter values. When you create the chore, you'll also need to specify default parameter values for each process which has them. The chore parameters will be used in preference to the process parameters when the process is run as part of the chore.

(Be careful; if you have a string parameter and enter a default value which is in a numeric format, you're likely to have problems. Chores, unlike processes, don't store the data type for each parameter. They "guess" when they are loaded based on what the parameter default is. Accordingly if you have a process that's expecting a string parameter and the chore passes it a number, you'll get an error.)

Other than that, parameters function exactly as variables do.

Suppose that you have a string parameter P0. When you put the process into the chore you need to define a default value for it; let's say that you assign 'abc'. When the chore runs, it will use 'abc' as the value for the parameter.

However, if you wish you can assign a different value to P0 in, say, the Prolog tab. This could be a value that's derived from formulas, or read from a cube, or even hard coded. So if you were to assign

Code: Select all

P0 = 'def';
then when the chore runs, 'def' will be used as the parameter value instead of 'abc'.

Re: TI Process with Parameters in a Chore

Posted: Thu May 06, 2010 3:52 am
by ExApplix
Yes, I do have the default parameter values defined in the Parameter Tab. Please see the attached screen shot.

I have understood that whatever is the 'Default Value' of the parameter it will be used when the Process is ran through a Chore. If I want to change the 'Default Value' during the process execution then I have to do it within the Prolog tab.

My parameters are defined as Strings. Please let me know if there will be any problems if I put this process in a Chore? If there is problem, then please suggest me a solution.

Thanks

Re: TI Process with Parameters in a Chore

Posted: Thu May 06, 2010 4:03 am
by Alan Kirk
ExApplix wrote:Yes, I do have the default parameter values defined in the Parameter Tab. Please see the attached screen shot.

I have understood that whatever is the 'Default Value' of the parameter it will be used when the Process is ran through a Chore.
Have you? Because that's not at all what I wrote.

I wrote that when you define a process with a parameter as part of a chore, you also need to define a default value in the chore. These will not be the ones in the screenshot that you've provided, though you can assign the chore level defaults the same values if you want subject to the caution that you should not assign numeric-type values as the default for a string parameter at chore level. The way you have 2008 as the default for pYear, for example, would cause you a world of problems were you to do it at chore level.
I wrote:When you create the chore, you'll also need to specify default parameter values for each process which has them. The chore parameters will be used in preference to the process parameters when the process is run as part of the chore.
(Emphasis added.)
ExApplix wrote: If I want to change the 'Default Value' during the process execution then I have to do it within the Prolog tab.
As with any variables you could technically change them on any tab, but the Prolog would be the most conventional (and usually useful) place to do it.
ExApplix wrote:My parameters are defined as Strings. Please let me know if there will be any problems if I put this process in a Chore? If there is problem, then please suggest me a solution.
Yes, the problem that I described in the initial post and again above. The solution is to put a text default value in for all string parameters, safe in the knowledge that you'll never actually use the default value.

Instead, assign the value that you do want to use in the Prolog, before you start the data processing.

Re: TI Process with Parameters in a Chore

Posted: Thu May 06, 2010 4:31 am
by Alan Kirk
To put this more clearly...

If THIS is the process' Parameters tab, with the default value ABC:
01_Process_Params.jpg
01_Process_Params.jpg (16.21 KiB) Viewed 14629 times
And THIS is the code on the Prolog tab:
02_Process_Prolog.jpg
02_Process_Prolog.jpg (29.72 KiB) Viewed 14629 times
(Edit: That should of course be override, not overrode. Common or garden typo.)

Then when you add the process to a chore you still need to define chore-level default values via the dialog below, which is accessed via the [Specify Values for Parameters...] button. The chore won't let you move to the next step unless you've specified default chore level parameter values for every process which has them:
03_Chore_Params.jpg
03_Chore_Params.jpg (24.34 KiB) Viewed 14629 times
Note two things in particular:
(a) The fact that the default parameter doesn't need to be the same as the one used at process level; and
(b) The absence of a place to specify whether the chore default is a string or numeric value, which is what causes problems if you have a numeric-type default for a string. (Yes, it shows it on the prompt side, but that's just reading from the process. It's not stored with the chore.)

When the process is run as a stand-alone process, then unless I change the default parameter value via the input prompt the output is:

Code: Select all

"ABC"
"XYZ"
When the process is run as part of a chore, it is:

Code: Select all

"DEF"
"XYZ"
And thus we see why I say that (a) the chore defaults override the process ones and (b) changing the value in the Prolog overrides both.

TI Process with Parameters

Posted: Tue Jun 30, 2015 11:20 am
by Chita
I have one element in the Dimention Scenario the name is Budget 2, I want copy the value in that element to another Budget whis is in the same dimension. The problem is i don't understand how to make the parameter in Turbointegrator and how to create the formula in Advanced tab. I'm so appreciate any help from my problem

Re: TI Process with Parameters in a Chore

Posted: Tue Jun 30, 2015 11:49 am
by BariAbdul
Plwase go through below links ,You will get answer to your questions.
http://www.olapline.de/docman-hierarchi ... /file.html
http://goo.gl/qh9kj6

Re: TI Process with Parameters

Posted: Wed Jul 01, 2015 2:54 am
by Chita
I've make the parameter like in the picture, in Tab Data i've made some formula whis is not work well. Can you help me :|

Re: TI Process with Parameters in a Chore

Posted: Wed Jul 01, 2015 2:57 am
by Chita
My formula is'nt work well. The value doesn't fill the input Cube where the element is in the same Dimension

Re: TI Process with Parameters in a Chore

Posted: Wed Jul 01, 2015 2:58 am
by Chita
Datasource that i used is IBM Cognos TM1 View

I want to copy the value in Budget 2 in Dimension Scenario whisi s in the same Cube
i create :
in Tab Parameter the default value of the parameter that i made is Budget 2
then i make the formula like this :
pBudget = 'Budget 4';

The process run success bt in my Cube the value is'nt copy at all
am i make a mistake formula ?
please give me some advice, thank you..

Re: TI Process with Parameters in a Chore

Posted: Tue Aug 09, 2016 12:43 pm
by ashokjb
Is it possible to insert multiple values for one parameter? Eg: 'Abc' , 'Def' for the same parameter.

Re: TI Process with Parameters in a Chore

Posted: Tue Aug 09, 2016 2:57 pm
by tomok
ashokjb wrote:Is it possible to insert multiple values for one parameter? Eg: 'Abc' , 'Def' for the same parameter.
Why would you want to do this? Think about it for a minute. If you had multiple values for the same parameter how would you know which one was the correct one to use when it came time to actually execute the process? If you are talking about submitting an array then no, there is no built-in facility in TM1 for that. You can create your own array by concatenating the values to together, with some sort of separator, and then parsing the string in your TI code.

Re: TI Process with Parameters in a Chore

Posted: Tue Aug 09, 2016 3:34 pm
by Steve Rowe
You can set the chore up twice, each time with a different parameter.