Page 1 of 1

Insert Element Using TI Process Parameters

Posted: Thu Aug 26, 2010 1:15 am
by PlanningDev
Im trying to add a new element to a dimension by using a websheet and a TI process that has 2 parameters.

Both parameters I have are set to string. I have mapped the parameters to two cells in excel when adding the Action Button.

When I press the run button while in excel nothing happens. When I press the run button in a websheet I get the failed message but there is no error in the error log.

This is the only code in the TI process and I have it in the Prolog
DimensionElementComponentAdd('DimName', pRollUp,pName, 1);

It doesn't seem like the parameter values are being passed from the excel reference to the TI Process. If I run the TI process while in the editor window and add values for the prompted parameters the TI Process works.

Have I missed something?

Re: Insert Element Using TI Process Parameters

Posted: Thu Aug 26, 2010 7:29 am
by kpk
Hello,

You need the DimensionElementInsert function first if you want to add a brand new element to a dimension.

In the TM1 reference guide you can find the complete list of TI, rule, worksheet functions of TM1.
You also find there sample codes and detailed description of arguments.

Kind regards,
Peter

Re: Insert Element Using TI Process Parameters

Posted: Thu Aug 26, 2010 4:01 pm
by PlanningDev
Thanks for the reply.

Actually you don't have to use DimensionElementInsert first as I have a process that will take data from a cube and create a new element using only the DimensionElementComponentAdd function.

This process completes successfully. For some reason when using parameters nothing seems to happen.

I did however try the DimensionElementInsert and same result. Nothing happens when run in excel, and Process Failed when run as a websheet.

Re: Insert Element Using TI Process Parameters

Posted: Fri Aug 27, 2010 12:40 am
by Martin Ryan
PlanningDev wrote: This process completes successfully. For some reason when using parameters nothing seems to happen.
Can you post your code, including a screenshot of the Parameters subtab? My guess would be that you're not referencing the parameter correctly.

Martin

Re: Insert Element Using TI Process Parameters

Posted: Fri Aug 27, 2010 1:34 am
by PlanningDev
Only thing listed in Prolog is this

Code: Select all

DimensionElementInsert('DimName', '',pName ,'N');
pRollup in the bottom picture is no longer there. I had it in there when I was attempting to add the element to a rollup.

Parameters Tab
Parameters.JPG
Parameters.JPG (16.84 KiB) Viewed 11818 times
Prolog
Prolog.JPG
Prolog.JPG (18.37 KiB) Viewed 11818 times
Excel Button
Button Options.JPG
Button Options.JPG (44.71 KiB) Viewed 11818 times

Re: Insert Element Using TI Process Parameters

Posted: Fri Aug 27, 2010 2:14 am
by Martin Ryan
You have got 'DimName' in quotes - do you have a dimension literally called 'DimName'?

Otherwise nothing else is leaping out at me - I'd try putting an asciioutput in the prolog and dumping out the parameter to see what information is getting passed to the process.

Martin

Re: Insert Element Using TI Process Parameters

Posted: Fri Aug 27, 2010 4:24 pm
by PlanningDev
Ok so this is a bit odd. I decided to look at the properties of the button (The excel properties using the developer tab). When I created the button I picked a TI process from 1 of the 3 servers we have up and running. The button itself listed the server as the first one in the list not the one I selected when creating the button. Therefore it appears the button was attempting to run the TI process but was pointed to the wrong server. After manually changing it back the TI process works and the parameters are being picked up.

Only other issue I have now is that I was hoping to use the picklist value from a TM1 cube to pass the selection to a parameter. Unfortunately this came back as null. Ill have to keep testing.

Im assuming this is odd behavior though? the server i first pick when adding the button isn't the one being written into the properties when I click finish.

Re: Insert Element Using TI Process Parameters

Posted: Sun Apr 17, 2011 3:10 pm
by Legemza
Hi,

i have simillar problem, i'm trying to add from websheet into the cube some string elements using TI process with one string parameter. The process fails only when is running from the websheet.
I tried to find, what is sent from web and therefore i used the AsciiOutput function. In the file was " ". Why is sending websheet into process only empty space instead of string? Btw. when i use in websheet SUBNM functio, to select an element of a dimension subset, the websheet will send into output "False". How can i store strings/numbers from tm1 web?

Thanks,
Lado

Re: Insert Element Using TI Process Parameters

Posted: Sun Apr 17, 2011 8:45 pm
by tomok
Legemza wrote:Hi,

i have simillar problem, i'm trying to add from websheet into the cube some string elements using TI process with one string parameter. The process fails only when is running from the websheet.
I tried to find, what is sent from web and therefore i used the AsciiOutput function. In the file was " ". Why is sending websheet into process only empty space instead of string? Btw. when i use in websheet SUBNM functio, to select an element of a dimension subset, the websheet will send into output "False". How can i store strings/numbers from tm1 web?
The only way anyone is going to be able to help you is if you post your TI code. You obviously have some sort of error in your code because it is rather easy to pass strings to a TI process from a websheet and have those same strings posted to a cube with a CellPutS function.

Re: Insert Element Using TI Process Parameters

Posted: Fri Apr 29, 2011 6:49 am
by Legemza
Hi,

the code was correct. When i have used another version of excel file (created in previous version of excel), the code was running successful.

Thx