Page 1 of 1
Edit alias using cube Element attribute
Posted: Wed Apr 13, 2011 1:18 am
by mail_kupi
Hi Everyone,
I try to make alias that is SUBST from own element. i found cube }element attribute save the attribute value and i can use rule to modified.
but i cannot used function in there SUBST([ELEMENT],1,4). any sugestion?
Thanks for your attention
Re: Edit alias using cube Element attribute
Posted: Wed Apr 13, 2011 2:01 am
by tomok
Aliases have to be unique. If you are trying to create an alias that consists of just the first four characters of the element name are you certain that there are no duplicates when you limit yourself to just looking at the first four characters of the elements?
Re: Edit alias using cube Element attribute
Posted: Wed Apr 13, 2011 3:04 am
by Andy Key
If you are creating a rule on an }ElementAttribute cube, all rules have to be written as S: (even if the attribute is defined as numeric, which isn't the case here as you are talking about aliases) and so have to use the DB() style reference rather than [ ] even though it is an internal reference.
Or if you are only refering to the dimension element won't
Code: Select all
['AttributeName'] = S: SubSt( !DimensionName, 1, 4);
Do what you want?
Re: Edit alias using cube Element attribute
Posted: Wed Apr 13, 2011 6:59 pm
by mattgoff
mail_kupi wrote:I try to make alias that is SUBST from own element. i found cube }element attribute save the attribute value and i can use rule to modified.
but i cannot used function in there SUBST([ELEMENT],1,4). any sugestion?
To amplify the part of Andy's post that I think contains the solution: you need to use the
!dimname notation.
Matt
Re: Edit alias using cube Element attribute
Posted: Tue Apr 26, 2011 8:01 am
by mail_kupi
Ok guys.. thanx a lot for the suggestion
i will try it...
really.. really.. thanx..
Re: Edit alias using cube Element attribute
Posted: Fri Jun 10, 2011 1:34 pm
by John Hammond
Thanks Andy - you saved my bacon with your answer.
As another point of interest even Text attributes are coded as N level elements in the attributes dimension rather than strings...