Hello,
I create some default views for users through TI processes.
Do you know a TI function which would allow me to assign a format to a view, or to some elements?
What I tried so far is to assign a format to some elements with attrputs function, like for instance:
attrputs('b:#,##0CO|0|','UNIT',V2,'FORMAT');
This instruction works individually.
But the thing is that I have many instances, and that processes are deployed to all instances through a zip file. The format (for instance 'b:#,##0CO|0|') is no more a valid format after being zipped and unzipped...
Any idea to help me?
Thanks in advance
Assigning format to a view in a TI process
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Assigning format to a view in a TI process
The attributes (including format) are stored in the dimension's attributes cube; this will be named }ElementAttributes_DimensionName, where "DimensionName" is the name of the dimension that the attributes are for. Those cubes have two dimensions; one is the dimension for which it is storing the attributes, and the other is a dimension which has the same name as the cube (that is, }ElementAttributes_DimensionName). You need to ensure that you send that cube and dimension with your zip file when you're deploying it.Catherine wrote:Hello,
I create some default views for users through TI processes.
Do you know a TI function which would allow me to assign a format to a view, or to some elements?
What I tried so far is to assign a format to some elements with attrputs function, like for instance:
attrputs('b:#,##0CO|0|','UNIT',V2,'FORMAT');
This instruction works individually.
But the thing is that I have many instances, and that processes are deployed to all instances through a zip file. The format (for instance 'b:#,##0CO|0|') is no more a valid format after being zipped and unzipped...
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 195
- Joined: Wed Jul 22, 2009 10:35 pm
- OLAP Product: TM1
- Version: 9.5.2 FP3
- Excel Version: 2010
Re: Assigning format to a view in a TI process
I am not exactly sure what your real issue is (and I would rather blame here me, not your post
), but I did a quick test, that maybe will help you in your case.
I created two small views that differ only with a fact that first of them has no formatting, second has a thousands separator and two decimal places.
I saved both files and the only difference I see is in two places in code in the .vue files. I will not put here screen-shots, just encourage to do the same easy test.
First place seems to be very intuitive:
375,b:0.#########G|0| (no formatting)
vs
375,b:#,##0.00CO|2| (with formatting)
Second place is in my case second line from the bottom in both .vue files:
11,20100622070827 (no formatting)
vs
11,20100622070845 (with formatting)
What I did later I shut down the TM1 server, copied the upper code from formatted .vue file to non formatted, left the lower code in the non formatted as it was and started the TM1 server. The formerly unformatted view had the same formatting set as the formatted one (like the second part of a code did not matter).
Note:
Changing the .vue file while the server was not down and then shutting down the server caused overwriting my change for the unformatted view, so it looks like putting server down before changes in files is necessary.
HTH

I created two small views that differ only with a fact that first of them has no formatting, second has a thousands separator and two decimal places.
I saved both files and the only difference I see is in two places in code in the .vue files. I will not put here screen-shots, just encourage to do the same easy test.
First place seems to be very intuitive:
375,b:0.#########G|0| (no formatting)
vs
375,b:#,##0.00CO|2| (with formatting)
Second place is in my case second line from the bottom in both .vue files:
11,20100622070827 (no formatting)
vs
11,20100622070845 (with formatting)
What I did later I shut down the TM1 server, copied the upper code from formatted .vue file to non formatted, left the lower code in the non formatted as it was and started the TM1 server. The formerly unformatted view had the same formatting set as the formatted one (like the second part of a code did not matter).
Note:
Changing the .vue file while the server was not down and then shutting down the server caused overwriting my change for the unformatted view, so it looks like putting server down before changes in files is necessary.
HTH
-
- Posts: 110
- Joined: Wed May 20, 2009 7:30 am
- OLAP Product: TM1
- Version: 10.2.2 - PA
- Excel Version: 2010
- Location: Rennes, France
Re: Assigning format to a view in a TI process
Thanks for your answers,
Alan Kirk,
I already have the dimension's attributes cube because my dimension elements have two aliases.
jstrygner,
I can not copy the .vue file because the views are recreated through a TI process during the night process.
In order to better explain the context, here are some additional explanations. I have a development instance. When I make some changes (evolutions/corrections), I take the different objects which have been changed (most of the time processes or rules). I put them in a zip file (on the development server). These files are automatically deployed to the 21 production instances (on the production servers).
I tried 2 ways to input my format in my process:
1/ attrputs('b:#,##0CO|0|','UNIT',V2,'FORMAT');
2/ CellPutS('b:#,##0CO|0|','}ElementAttributes_UNIT',V2,'FORMAT');
The problem is that TM1 does does not recognize 'Format' as an existing attribute (in 1/), nor as an element of }ElementAttributes_UNIT dimension (in 2/). As a matter of fact, if you have a look at the }ElementAttributes_UNIT dimension, it does not contain a 'Format' element...
Any idea?
Thanks in advance
Catherine
Alan Kirk,
I already have the dimension's attributes cube because my dimension elements have two aliases.
jstrygner,
I can not copy the .vue file because the views are recreated through a TI process during the night process.
In order to better explain the context, here are some additional explanations. I have a development instance. When I make some changes (evolutions/corrections), I take the different objects which have been changed (most of the time processes or rules). I put them in a zip file (on the development server). These files are automatically deployed to the 21 production instances (on the production servers).
I tried 2 ways to input my format in my process:
1/ attrputs('b:#,##0CO|0|','UNIT',V2,'FORMAT');
2/ CellPutS('b:#,##0CO|0|','}ElementAttributes_UNIT',V2,'FORMAT');
The problem is that TM1 does does not recognize 'Format' as an existing attribute (in 1/), nor as an element of }ElementAttributes_UNIT dimension (in 2/). As a matter of fact, if you have a look at the }ElementAttributes_UNIT dimension, it does not contain a 'Format' element...
Any idea?
Thanks in advance
Catherine
-
- MVP
- Posts: 214
- Joined: Tue Nov 11, 2008 11:57 pm
- OLAP Product: TM1, CX
- Version: TM1 7x 8x 9x 10x CX 9.5 10.1
- Excel Version: XP 2003 2007 2010
- Location: Hungary
Re: Assigning format to a view in a TI process
"The problem is that TM1 does does not recognize 'Format' as an existing attribute (in 1/), nor as an element of }ElementAttributes_UNIT dimension (in 2/). As a matter of fact, if you have a look at the }ElementAttributes_UNIT dimension, it does not contain a 'Format' element...
Any idea?"
As far as I remember the FORMAT element inserted into the ElementAttributes_UNIT dimension when you change at least one element format for the first time.
Afterwards you will see it in the attribute dimension.
Regards,
Peter
Any idea?"
As far as I remember the FORMAT element inserted into the ElementAttributes_UNIT dimension when you change at least one element format for the first time.
Afterwards you will see it in the attribute dimension.
Regards,
Peter
Best Regards,
Peter
Peter
-
- MVP
- Posts: 352
- Joined: Wed May 14, 2008 1:37 pm
- OLAP Product: TM1
- Version: 2.5 to PA
- Excel Version: Lots
- Location: Sydney
- Contact:
Re: Assigning format to a view in a TI process
Further to what Peter said, you can force the Format attribute to be created on your production servers without making any manual changes by running
in your process before your AttrPutS lines.
Code: Select all
AttrInsert( 'UNIT', '', 'Format', 's');
Andy Key
-
- Posts: 110
- Joined: Wed May 20, 2009 7:30 am
- OLAP Product: TM1
- Version: 10.2.2 - PA
- Excel Version: 2010
- Location: Rennes, France
Re: Assigning format to a view in a TI process
Thanks Andy,
It works perfectly well with that instruction
So far it works on my development server. I hope it will work fine as well on my production servers, because I tried a few months ago, and I thought the problem was with the format itself. It seemed to me that zipping and unzipping the format was my problem, but I have good reason to think that I was wrong
. I'll try next week.
It works perfectly well with that instruction

So far it works on my development server. I hope it will work fine as well on my production servers, because I tried a few months ago, and I thought the problem was with the format itself. It seemed to me that zipping and unzipping the format was my problem, but I have good reason to think that I was wrong
