Hi,
I am trying to localize the dimension element names by creating an attribute called caption and populating it with ATTRPUTS Ti function ( for the selected language ), basically Im trying to figure out a way to create a default display type of Alias so every time you click the dimension in TM1Web, it shows the "Caption" instead of element code.
Here is the code I am using
myDim = 'Month' ;
AttrInsert(myDim, '', 'Caption', 'A');
AttrPutS('January', myDim, 'M1', 'Caption', 'en');
AttrPutS('February', myDim, 'M2', 'Caption', 'en');
AttrPutS('March', myDim, 'M3', 'Caption', 'en');
AttrPutS('Janvier', myDim, 'M1', 'Caption', 'fr');
AttrPutS('Fevrier', myDim, 'M2', 'Caption', 'fr');
AttrPutS('Mars', myDim, 'M3', 'Caption', 'fr');
I can run the code with no errors, and also I can see that it creates and populates the cube }LocalizedElementAttributes_Month as expected
I have a cube that uses month dimension, and when I connect to TM1Web and double click on my cube name, it brings the default view ( as expected ) but when I click on Dimension Month, I see element names ( M1, M2, M3 ), not the English Values for caption attribute
AM I missing something here?
Thanks
Localization of Dimension Elements with Caption Attribute
- jim wood
- Site Admin
- Posts: 3961
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Localization of Dimension Elements with Caption Attribute
It needs to be an alias. Are you sure you created it as an alias?
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- Posts: 132
- Joined: Thu Oct 23, 2014 10:15 pm
- OLAP Product: tm1, cognos bi
- Version: 10.2
- Excel Version: 2010
Re: Localization of Dimension Elements with Caption Attribute
It is an Alias, and I can see it in the list of Aliases in the subset editor, and yes If I manually turn the Caption Alias ON, it shows the values. But I thought this should show automatically, otherwise, what is the difference from a regular alias?
Thanks
Thanks
-
- 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: Localization of Dimension Elements with Caption Attribute
Cube views don't automatically default to using an alias for dimensions unless you specifically set that. Does the default view you talk about above have the Month dimension set to use the alias instead of the dimension elements?tm123 wrote:I have a cube that uses month dimension, and when I connect to TM1Web and double click on my cube name, it brings the default view ( as expected ) but when I click on Dimension Month, I see element names ( M1, M2, M3 ), not the English Values for caption attribute
-
- Posts: 132
- Joined: Thu Oct 23, 2014 10:15 pm
- OLAP Product: tm1, cognos bi
- Version: 10.2
- Excel Version: 2010
Re: Localization of Dimension Elements with Caption Attribute
It does not, and that's what I am trying, to avoid users see the element codes since they have no meaning to them, instead I am trying to use this Caption Alias, which in all other cases ( for Cube Names and Dimension Names ) is applied automatically, so if there is a Caption Attribute defined for a cube name, that is the name it shows in TM1Web for that cube. I am sure I had asked this question to IBM when this new thing was introduced, and they told me that will be the default display name for the elements in all the clients that support that. So If the user has to select that manually, than this is no different from traditional Alias toggle and I don't see much value in this, but probably I am missing something, some place somewhere to tell the system to show Caption Alias by default, same thing as in Cognos BI/FM/Report Studio
Thanks anyways
Thanks anyways
-
- 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: Localization of Dimension Elements with Caption Attribute
What the Caption thing does is automatically pick the language for you based on the browser setting. Since cubes and dimensions don't really have attributes, using the caption just automatically switches their name to the appropriate language. Since elements can have multiple attributes and aliases, it is up to you to pick the "Caption" attribute for the specific cube view. Then TM1 will automatically choose which language to display.tm123 wrote:It does not, and that's what I am trying, to avoid users see the element codes since they have no meaning to them, instead I am trying to use this Caption Alias, which in all other cases ( for Cube Names and Dimension Names ) is applied automatically, so if there is a Caption Attribute defined for a cube name, that is the name it shows in TM1Web for that cube.
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Localization of Dimension Elements with Caption Attribute
The other thing about the new caption capability is that you can use any text attribute. It doesn't have to be an alias. This means that you can have multiple items with the same caption. So if you have France->Paris and Texas->Paris you can call both the leaves Paris.
-
- Posts: 132
- Joined: Thu Oct 23, 2014 10:15 pm
- OLAP Product: tm1, cognos bi
- Version: 10.2
- Excel Version: 2010
Re: Localization of Dimension Elements with Caption Attribute
Thank you guys,
Regarding 'Caption' attribute, I thought also that it can be also String type attribute and then it can be used as a Display in TM1Web. I can create it as caption attribute and I can see it in the cube }LocalizedElementAttributes_Month, but I cant see how I can use it as a display. Even when I try to use the "Filter by Attribute", the attribute name "Caption" shows in the list, but no values show for it, so that tells me that there must be something I'm missing
Regarding 'Caption' attribute, I thought also that it can be also String type attribute and then it can be used as a Display in TM1Web. I can create it as caption attribute and I can see it in the cube }LocalizedElementAttributes_Month, but I cant see how I can use it as a display. Even when I try to use the "Filter by Attribute", the attribute name "Caption" shows in the list, but no values show for it, so that tells me that there must be something I'm missing
