DimensionSortOrder issue

Post Reply
elee123
Posts: 19
Joined: Fri Nov 21, 2014 5:01 pm
OLAP Product: tm1
Version: 10.1
Excel Version: 2010

DimensionSortOrder issue

Post by elee123 »

Hi ALL,
Has anyone encountered any issue when doing DimensionSortOrder( 'dimname', 'ByInput', 'ascending', 'ByHierarchy', 'Ascending') in Epilog?
I ran a simple TI that updates a dimension elements & consolidated ones with the Oracle SQL as data source. It would run fine without the DimensionSortOrder function in Epilog, but when the function is on, I'd get the following error:
"ABC","","XYZ","AFF", Data Source line (1) Error: MetaData procedure line (8): Unknown error response from obtabCellWriteStatusGet() = 140.

Has anyone seen an error like this?
Thank you.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: DimensionSortOrder issue

Post by declanr »

It would be surprising if the 2 are related; especially as the error is on the metadata tab and TM1 doesn't really look as far forward as the epilog until it needs to.
Also I seem to recall dimensionsortorder not working on the epilog anyway as TM1 considers it a metadata function (therefore a prolog or metadata tab function); I don't think it broke anything though - it just didn't do anything.
Declan Rodger
elee123
Posts: 19
Joined: Fri Nov 21, 2014 5:01 pm
OLAP Product: tm1
Version: 10.1
Excel Version: 2010

Re: DimensionSortOrder issue

Post by elee123 »

Should we be running DimensionSortOrder in metadata? Isn't it better to wait until the process finish scanning all the records in sql then call the function in epilog?
I've got DimensionElementInsertDirect in Metadata section, does anyone see a conflict between this 'direct' function and 'sort' function?
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: DimensionSortOrder issue

Post by tomok »

To the best of my recollection, at least for older versions of TM1, metadata functions are ignored when put in the epilog of a process. The bigger question is why would you be setting the sort order of a dimension in the epilog of a process. By the time you get to the epilog, all the dimension updates have already happened so changing the sort order would only affect future changes to the dimension. The documentation for the DimensionSortOrder states:
DimensionSortOrder sets properties for a dimension; the dimension is not actually sorted until it is saved on the server
So, setting the sort order does not actually sort a dimension, it just changes the setting (which is actually just a value in the }CubeProperties cube) so that THE NEXT TIME THE DIMENSION IS SAVED IT WILL BE SORTED. The save you are looking for has already happened once you get to the epilog.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: DimensionSortOrder issue

Post by paulsimon »

Hi

You would be better putting the settings directly into the }DimensionProperties cube. You will find elements there related to the 4 sort settings. That is what I always do these days as DimensionSortOrder does not work well. It must be used in the Prolog. It only works when the dimension is empty. By comparison putting the sort requirements directly into }DimensionProperties works whenever the dimension is updated.

Regards

Paul Simon
Post Reply