Page 1 of 1

SubsetAliasSet weird behavior

Posted: Fri May 05, 2017 12:57 am
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

Re: SubsetAliasSet weird behavior

Posted: Fri May 05, 2017 8:28 am
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

Re: SubsetAliasSet weird behavior

Posted: Fri May 05, 2017 10:12 am
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...

Re: SubsetAliasSet weird behavior

Posted: Fri May 05, 2017 10:59 am
by Wim Gielis
What about restarting the model ?

Re: SubsetAliasSet weird behavior

Posted: Tue May 09, 2017 7:15 am
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!