Page 1 of 1

Wildcard in rules?

Posted: Wed Mar 09, 2011 9:52 am
by jbcraigs
Is there a way to use wildcards in TM1 rules?

For example if I want to set value of all elements starting with code 123( eg. 12345 & 12399) to a certain value, is there a way to do it in rules?

Thanks.

Re: Wildcard in rules?

Posted: Wed Mar 09, 2011 10:36 am
by lotsaram
Of course there will be much more to it in practice but in a nutshell here is a solution to what you are asking.

Code: Select all

[ ] = N:
IF( SubSt(!EleName, 1, 3) @= '123',
  #Your value  
  1,
  #Move on and see if any other conditions apply to this cube area
  CONTINUE
);

Re: Wildcard in rules?

Posted: Wed Mar 09, 2011 4:37 pm
by csjean
Hi,

Of course, you can also use the "SCAN" function to find a substring inside the elemnt name.

For example, say you want to set a value for all element ending by "-99":

Code: Select all

IF (SCAN('-99', !Element) > 0 );
Hope this helps...

Cheers!

Claude.