Page 1 of 1

TM1 does not display the aliases

Posted: Fri Nov 04, 2011 10:37 am
by ub14
Hi all,

We know that By default, TM1 does not display the aliases.
Currently we are building 20 to 30 dimension which are having aliases. After creating the cube, we need to set the use aliases button in each dimension manually.

Is there any we can set use aliases on option for all dimensions.

Re: TM1 does not display the aliases

Posted: Fri Nov 04, 2011 10:57 am
by lotsaram
Have you tried the SubsetAliasSet function in TurboIntegrator? Assuming you have a default subset defined or a consistent naming convention for the subsets to assign a display alias to and a consistent naming convention for aliases then I think this would do exactly as you need.

This code snippet should do what you require.

Code: Select all

# loop through dimensions to set display alias
sDimName = '}Dimensions';
sSubName = 'Default';
sAliasName = 'Code and Description'; 
nCounter = 1;
nMaximum = DimSiz(sDimName);
WHILE(nCounter <= nMaximum);
  sElName = DimNm(sDimName, nCounter);
  IF( SubSt(sElName, 1, 1) @<> '}' & DimensionExists('}ElementAttributes_' | sElName) = 1 );
    IF( SubsetExists(sElName, sSubName) = 1 & DIMIX('}ElementAttributes_' | sElName, sAliasName) > 0 );
      SubsetAliasSet(sElName, sSubName, sAliasName);
    EndIF;
  EndIF;
  nCounter = nCounter + 1;
END;