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?
Add View to Application Folder(architect) from TI Process
-
- MVP
- Posts: 3702
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Add View to Application Folder(architect) from TI Proces
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.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?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Add View to Application Folder(architect) from TI Proces
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)!
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?
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 );
Robin Mackenzie