fileexists and dimensionexists
-
- Posts: 10
- Joined: Mon Sep 18, 2017 9:12 am
- OLAP Product: tm1
- Version: 10.2.2
- Excel Version: 2010
fileexists and dimensionexists
i am new to tm1. i want to make a ti process which first check wether the file exists or not, if fileexists then process should continue otherwise it should exit with a suitable message.then it should check for dimension and create or update according to availability of dimension.
-
- Community Contributor
- Posts: 248
- Joined: Tue Nov 01, 2011 10:31 am
- OLAP Product: TM1
- Version: All
- Excel Version: All
- Location: Manchester
- Contact:
Re: fileexists and dimensionexists
What have you tried so far?
Have you seen the request for assistance guidelines
Have you tried googling for any information?
https://www.google.co.uk/search?q=cogno ... e&ie=UTF-8
Have you seen the request for assistance guidelines
Have you tried googling for any information?
https://www.google.co.uk/search?q=cogno ... e&ie=UTF-8
-
- Posts: 10
- Joined: Mon Sep 18, 2017 9:12 am
- OLAP Product: tm1
- Version: 10.2.2
- Excel Version: 2010
Re: fileexists and dimensionexists
i tried this
if(FileExists('filename')=1);
ExecuteProcess('dim_name');
else;
ProcessQuit;
endif;
but this one is sending the process into loop
and for dimension part i did
if(dimesnionexists('dim_name')=0);
dimensioncreate('dim_name');
else;
dimensionupdatedirect('dim_name');
endif;
if(FileExists('filename')=1);
ExecuteProcess('dim_name');
else;
ProcessQuit;
endif;
but this one is sending the process into loop
and for dimension part i did
if(dimesnionexists('dim_name')=0);
dimensioncreate('dim_name');
else;
dimensionupdatedirect('dim_name');
endif;
-
- Regular Participant
- Posts: 424
- Joined: Sat Mar 10, 2012 1:03 pm
- OLAP Product: IBM TM1, Planning Analytics, P
- Version: PAW 2.0.8
- Excel Version: 2019
Re: fileexists and dimensionexists
Have you defined the path correctly in the TI :
FileExists('C:\tm1s7\pdata\model.dim');
And created a wapper process to perform the evaluation in the PROLOG:
IF(FileExists('FILENAME') =1);
ExecuteProcess('Load Process Name Here');
ELSE;
ProcessQuit;
ENDIF;
As for the second part:
FileExists('C:\tm1s7\pdata\model.dim');
And created a wapper process to perform the evaluation in the PROLOG:
IF(FileExists('FILENAME') =1);
ExecuteProcess('Load Process Name Here');
ELSE;
ProcessQuit;
ENDIF;
As for the second part:
ThanksThis feature can be used extensively after direct dimensioning with DimensionElementInsertDirect, DimensionElementDeleteDirect, DimensionElementComponentAddDirect, DimensionElementComponentDeleteDirect and / or DimensionTopElementInsertDirect. Calling the DimensionUpdateDirect function causes the entire memory to start consuming, but can be used to ensure that the dimension is the smallest possible impression of the memory when the processing is completed.
"You Never Fail Until You Stop Trying......"
-
- Posts: 10
- Joined: Mon Sep 18, 2017 9:12 am
- OLAP Product: tm1
- Version: 10.2.2
- Excel Version: 2010
Re: fileexists and dimensionexists
so i have to create two processes for fileexists to work ,please tell if there is some way i can do in single processBariAbdul wrote: ↑Wed Sep 20, 2017 11:30 am Have you defined the path correctly in the TI :
FileExists('C:\tm1s7\pdata\model.dim');
And created a wapper process to perform the evaluation in the PROLOG:
IF(FileExists('FILENAME') =1);
ExecuteProcess('Load Process Name Here');
ELSE;
ProcessQuit;
ENDIF;
As for the second part:ThanksThis feature can be used extensively after direct dimensioning with DimensionElementInsertDirect, DimensionElementDeleteDirect, DimensionElementComponentAddDirect, DimensionElementComponentDeleteDirect and / or DimensionTopElementInsertDirect. Calling the DimensionUpdateDirect function causes the entire memory to start consuming, but can be used to ensure that the dimension is the smallest possible impression of the memory when the processing is completed.
and can i use a if within a if in ti
-
- MVP
- Posts: 2832
- 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: fileexists and dimensionexists
No, it isn't sending your process into a loop as you do not have any looping code, i.e., no WHILE statement. What you cannot do is use this logic in the Data tab, it must be in the Prolog. Yes, it is technically possible to do a FileExists in the Data tab but not with the logic you are using.
-
- Posts: 10
- Joined: Mon Sep 18, 2017 9:12 am
- OLAP Product: tm1
- Version: 10.2.2
- Excel Version: 2010
Re: fileexists and dimensionexists
can you suggest if file is missing i have to exit the process with a message, how to do that
-
- MVP
- Posts: 3120
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: fileexists and dimensionexists
One option is:
Above the ProcessQuit, add a line with the LogOutput function. Then you get the message you want in the message log. If you want to have the messsage in a different way, please give more context.
Above the ProcessQuit, add a line with the LogOutput function. Then you get the message you want in the message log. If you want to have the messsage in a different way, please give more context.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Regular Participant
- Posts: 424
- Joined: Sat Mar 10, 2012 1:03 pm
- OLAP Product: IBM TM1, Planning Analytics, P
- Version: PAW 2.0.8
- Excel Version: 2019
Re: fileexists and dimensionexists
You could get further info regarding LogOutput here:
https://everanalytics.wordpress.com/201 ... ognos-tm1/ Thanks
https://everanalytics.wordpress.com/201 ... ognos-tm1/ Thanks
"You Never Fail Until You Stop Trying......"