Page 1 of 1

Rule

Posted: Fri Sep 10, 2010 5:40 am
by daya007
Hi

I have to get the highest index value element into left side of the rule dynamically. Please share ur idea on this.
I tried to do this but it returns error

Code: Select all

['(DIMNM('Date_History', DIMSIZ('Date_History')))']
Thanks
Daya

Re: Rule

Posted: Fri Sep 10, 2010 5:46 am
by Alan Kirk
daya007 wrote: I have to get the highest index value element into left side of the rule dynamically. Please share ur idea on this.
I tried to do this but it returns error

Code: Select all

['(DIMNM('Date_History', DIMSIZ('Date_History')))']
For one thing you have quotes around the expression, which means that you aren't using either function but rather (DIMNM('Date_History', DIMSIZ('Date_History'))) as a literal string.

It might be better to put the full rule and the actual error that you're getting when asking questions like these.

Re: Rule

Posted: Fri Sep 10, 2010 5:50 am
by Alan Kirk
Alan Kirk wrote:
daya007 wrote: I have to get the highest index value element into left side of the rule dynamically. Please share ur idea on this.
I tried to do this but it returns error

Code: Select all

['(DIMNM('Date_History', DIMSIZ('Date_History')))']
For one thing you have quotes around the expression, which means that you aren't using either function but rather (DIMNM('Date_History', DIMSIZ('Date_History'))) as a literal string.
Actually I take that back; the rules syntax doesn't / can't nest quotes so as far as the rules compiler is concerned you're using '(DIMNM(' as one literal string, , ', DIMSIZ(' as another literal string, ')))' as a third one, and TM1 will have no idea what the bits in between mean.

Re: Rule

Posted: Fri Sep 10, 2010 6:27 am
by lotsaram
daya007 wrote:

Code: Select all

['(DIMNM('Date_History', DIMSIZ('Date_History')))']
Also to add to Alan's comments, it would appear that you are trying to use a function within the square bracket (shorthand) notation. The square bracket notation can only accept literal strings as arguments. If you want to nest functions then you must use the full DB() notation on the right hand side of the rule. If you want to nest functions on the left hand side then you can't as the area statement on the left of a rule can only accept square bracket notation.