SubsetAliasSet weird behavior

Post Reply
vladino
Posts: 110
Joined: Sat Nov 06, 2010 10:10 am
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: Excel 2013

SubsetAliasSet weird behavior

Post by vladino »

Hi guys,
I'm getting really strange behavior of SubsetAliasSet TI function.

I have created a new dynamic subset (it doesn't matter if it's been created within TI process or manually).
Now I would like to set the alias for the subset using SubsetAliasSet.

When I use following code:

Code: Select all

SubsetAliasSet('Dimension', 'temp', 'Alias');
I'm getting following error:
Error: Epilog procedure line (5): Subset "temp" not found in dimension "Alias"

Which is strange as the parameters of SubsetAliasSet are DimName, SubName, AliasName.

When I change the order of parameters like this:

Code: Select all

SubsetAliasSet('Alias', 'temp', 'Dimension');
I'm getting following error:
Error: Epilog procedure line (6): Subset "temp" not found in dimension "Dimension"

But I can see the subset on the dimension!

Am I doing something wrong or is it a bug?

Thanks a lot for your help!

BR
Vladino
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SubsetAliasSet weird behavior

Post by Wim Gielis »

Hello there,

This comes straight out of an IBM TI process:

Code: Select all

}tp_create_planning_artifacts:
Line 423: 	SubsetAliasSet('}Groups', cTpDefaultSubset, '}TM1_DefaultDisplayValue');
So that's the syntax (and I use it a lot like this).

Are you sure that the objects exist ?
What does SubsetExists( ... ) give you ?
DimensionExists( ... ) ?
Dimix( '}ElementAttributes_Dimension', 'Alias' ) ?
Dtype( '}ElementAttributes_Dimension', 'Alias' ) ?

What if you create a new subset manually ?
Does it work on another dimension / subset / alias combination ?

Do you use localisations of dimension names ?

And so on.

Wim
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
vladino
Posts: 110
Joined: Sat Nov 06, 2010 10:10 am
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: Excel 2013

Re: SubsetAliasSet weird behavior

Post by vladino »

Hi Wim,
Wim Gielis wrote:Are you sure that the objects exist ?
What does SubsetExists( ... ) give you ?
DimensionExists( ... ) ?
Dimix( '}ElementAttributes_Dimension', 'Alias' ) ?
Dtype( '}ElementAttributes_Dimension', 'Alias' ) ?
Yes, the objects exist - SubsetExists returns 1, DimensionExists also returns 1.
Dimix returns 5.
Dtype returns "AA".

Wim Gielis wrote:Does it work on another dimension / subset / alias combination ?
Yes, it seems that on other dimensions it works.
Wim Gielis wrote:Do you use localisations of dimension names ?
I just changed the "Caption" attribute for all dimensions.

This is really strange...
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SubsetAliasSet weird behavior

Post by Wim Gielis »

What about restarting the model ?
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
vladino
Posts: 110
Joined: Sat Nov 06, 2010 10:10 am
OLAP Product: Cognos TM1
Version: 10.2.2
Excel Version: Excel 2013

Re: SubsetAliasSet weird behavior

Post by vladino »

Wim Gielis wrote:What about restarting the model ?
Ahh, I forgot to use the easiest way how to fix most problems... After restarting the TM1 instance is works. :)

Thanks Wim!
Post Reply