Avoiding duplicate elements in TI script

Post Reply
svchowdary83
Posts: 7
Joined: Thu Aug 02, 2012 12:31 pm
OLAP Product: cognos TM1
Version: 9.5.1
Excel Version: 2010

Avoiding duplicate elements in TI script

Post by svchowdary83 »

how to prepare the TI script:
user to add in new cost element . when the user enters a new code, the system will have to check through all the elements if the code exist,the system will prompt the user to enter a different code to avoid duplication. If there is no such code, the system will create a new element with the necessarily attributes and alias.
Here cost element is the Dimension name
Its urgent ,can anybody help me on this
Last edited by svchowdary83 on Thu Sep 13, 2012 3:17 am, edited 4 times in total.
asutcliffe
Regular Participant
Posts: 164
Joined: Tue May 04, 2010 10:49 am
OLAP Product: Cognos TM1
Version: 9.4.1 - 10.1
Excel Version: 2003 and 2007

Re: Inserting New Elements based some condition by using TI

Post by asutcliffe »

svchowdary83 wrote:how to prepare the TI script:
user to add in new cost element . when the user enters a new code, the system will have to check through all the elements if the code exist,the system will prompt the user to enter a different code to avoid duplication. If there is no such code, the system will create a new element with the necessarily attributes and alias.
Here cost element is the Dimension name
Its urgent ,can anybody help me on this
How far have you managed to get? Writing a TI process to add an element and set a few attributes is pretty straightforward. Take a look at the "DimensionElementInsert" and "AttrPutS" functions if you've not already.

However, prompting a user for a different element name if it already exists isn't really possible in TI alone. One approach I've used is to get the user to enter the element name and attribute values in a simple spreadsheet. Using the "DimIx" worksheet function and a bit of conditional formatting, you can provide feedback to the user if the element already exists. These values can then be passed to a TI process as parameters and the process triggered via an action button.

Note, it isn't possible to create a new element with the same name as an existing one. So if all you're worrying about is avoiding "duplication", you might not need to worry.
Post Reply