Page 1 of 1

Add View to Application Folder(architect) from TI Process

Posted: Mon Dec 08, 2014 12:45 pm
by Motyl
Hi

How to add View to Application Folder(architect) from TI Process.

For Example: I have View: SalesByCustomers - Simulation1 and I want to put it into Application folder (Folder Structure in Architetct): Application\Sales\Simulation usint TI Process.
How to do it?

Re: Add View to Application Folder(architect) from TI Proces

Posted: Mon Dec 08, 2014 1:31 pm
by lotsaram
Motyl wrote:Hi

How to add View to Application Folder(architect) from TI Process.

For Example: I have View: SalesByCustomers - Simulation1 and I want to put it into Application folder (Folder Structure in Architetct): Application\Sales\Simulation usint TI Process.
How to do it?
You request the feature to be added. If you can't wait that long then you manually drag the view to the folder using the GUI. No I'm not kidding, wish I was.

Re: Add View to Application Folder(architect) from TI Proces

Posted: Tue Dec 09, 2014 12:13 pm
by rmackenzie
It's possible, in a partial way, but you need to bounce the server to get TM1 to rebuild the application folder tree from the content in }Applications within your data directory. The following code will build a file in }Applications that will create the entry post-re-start. There's several different directions you can extend this code and it's possible to build a decent bit of framework to automate the construction of your Application folders if you know what you want to do well in advance of deployment. It's such a pain hand-building a large Application tree that it's possible that extending this code is well worth your time and effort. Then again, depending on your level of love with Iboglix then it may well be worth trying to wield your influence with their development team to do something that is probably quite low-hanging fruit for them (on a technical level)!

Code: Select all

# ensure no quotes in the output
DatasourceASCIIQuoteCharacter = '';

# application entry values
sCubeName = 'Calc_Output';
sViewName = 'testview';
sApplicationFolder = 'test1';
sEntryType = 'view';
sDir = 'd:\tm1data\testserver\}applications\' | sApplicationFolder | '\';
sViewEntry = sViewName | '.' | sEntryType;
sAppDimEntry = sApplicationFolder | '\' | sViewEntry;

# output file to }Applications
sText = 'FILE_FORMAT=100' | CHAR(13) | CHAR (10);
sText = sText | 'ENTRYNAME=' | sViewName | CHAR(13) | CHAR (10);
sText = sText | 'ENTRYTYPE=' | sEntryType | CHAR(13) | CHAR (10);
# must refer to the real cube view
sText = sText | 'ENTRYREFERENCE=TM1:///VIEW/PUBLIC/' | sCubeName  | '/' | sViewName ;

AsciiOutput ( sDir | sViewEntry, sText );
I don't know of any way to 'kick' the server in-session to get it to rebuild the Application folder tree - perhaps there is a method? Any reasonable API jockey will have noted this is woefully under-implemented (and un-documented) in the various APIs. Maybe there's something new in 10.2.x that people care to comment about?