Page 1 of 1

Ways of create pseudo hierarchies

Posted: Wed Apr 17, 2013 6:58 am
by EP_explorer
Sometimes it is necessary to show for users pseudo hierarchies which are looking like a hierarchy but they are not

For example like this
(see theme about it here
http://www.tm1forum.com/viewtopic.php?f=3&t=8833 )
04.JPG
04.JPG (22 KiB) Viewed 3533 times
But it seems this idea doesn't work properly

The only way which comes to my mind is create alias which look like
06.JPG
06.JPG (9.61 KiB) Viewed 3533 times
And it looks in view like
05.JPG
05.JPG (21.68 KiB) Viewed 3533 times
But first variant looks better because in the second one I have to add symbol '-' in start of element in alias - unfortunattely I can't start from spaces ' ' in names

So may be somebody could give me idea how to show pseudo hierarchies which would look like the first case.

Re: Ways of create pseudo hierarchies

Posted: Wed Apr 17, 2013 10:57 am
by lotsaram
You can use the ASCII ALT-255 character as a indenting prefix in an alias. This is a space character but is not ignored by TM1 as are regular spaces.

Re: Ways of create pseudo hierarchies

Posted: Wed Apr 17, 2013 12:25 pm
by EP_explorer
lotsaram wrote:You can use the ASCII ALT-255 character as a indenting prefix in an alias. This is a space character but is not ignored by TM1 as are regular spaces.
When I tried to input alt+255 in Attributes Editor it saves only without first empty places - think it is a space anyway.

But helps

Code: Select all

  str1=Char(160) |  '  Regions_lev1';
  AttrPutS(str1, 'Regions', 'Regions_lev1', 'Reg_name');

Re: Ways of create pseudo hierarchies

Posted: Thu Apr 18, 2013 12:23 am
by rmackenzie
EP_explorer wrote:
lotsaram wrote:You can use the ASCII ALT-255 character as a indenting prefix in an alias. This is a space character but is not ignored by TM1 as are regular spaces.
When I tried to input alt+255 in Attributes Editor it saves only without first empty places - think it is a space anyway.

But helps

Code: Select all

str1=Char(160) | ' Regions_lev1';
AttrPutS(str1, 'Regions', 'Regions_lev1', 'Reg_name');
So shouldn't your code use Char(255)? Are you getting the desired effect with Char(160)?

Re: Ways of create pseudo hierarchies

Posted: Thu Apr 18, 2013 7:59 am
by EP_explorer
Yes.
If I useChar(255) in TI process it puts the symbol of national alphabit - not space, but if I put Char(160) - it works.

If I put Alt+255 by hands in Attribute Editor it puts space but it doesn't save with space - simply delete spaces before first letter

Re: Ways of create pseudo hierarchies

Posted: Thu Apr 18, 2013 8:21 am
by Duncan P