Insert Element Using TI Process Parameters

Post Reply
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Insert Element Using TI Process Parameters

Post 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?
kpk
MVP
Posts: 214
Joined: Tue Nov 11, 2008 11:57 pm
OLAP Product: TM1, CX
Version: TM1 7x 8x 9x 10x CX 9.5 10.1
Excel Version: XP 2003 2007 2010
Location: Hungary

Re: Insert Element Using TI Process Parameters

Post 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
Best Regards,
Peter
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: Insert Element Using TI Process Parameters

Post 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.
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Insert Element Using TI Process Parameters

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: Insert Element Using TI Process Parameters

Post 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 11820 times
Prolog
Prolog.JPG
Prolog.JPG (18.37 KiB) Viewed 11820 times
Excel Button
Button Options.JPG
Button Options.JPG (44.71 KiB) Viewed 11820 times
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Insert Element Using TI Process Parameters

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: Insert Element Using TI Process Parameters

Post 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.
Legemza
Posts: 10
Joined: Wed Feb 02, 2011 8:30 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: Insert Element Using TI Process Parameters

Post 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
tomok
MVP
Posts: 2836
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: Insert Element Using TI Process Parameters

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Legemza
Posts: 10
Joined: Wed Feb 02, 2011 8:30 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: Insert Element Using TI Process Parameters

Post 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
Post Reply