Page 1 of 1

By passing rules

Posted: Sun Dec 19, 2010 3:33 pm
by Radhika
Hi All,

I have written a rule, but I am having a problem while using STET function in the below mentioned rules.
['Unit Sale Price' ] = N:1;C:20;
['Q1' ] =STET;
['Status' ] =s:IF(['Unit Sale Price' ] >0,'Pass','Fail');
['Q1','Status' ] = S:'Good';

Line 1, 2,3 is executed successfully. Using STET I am able to by pass Q1 from the immediate below rule, but after that I am trying to assign value to Q1 which I could not. As per my understanding STET is used to by pass an element only from the next statement but from all.

Please help me/provide a solution to assign values to Q1 after using STET. Below attached is the screen shot of the cube.

Thanks & Regards,
Radhika

Re: By passing rules

Posted: Sun Dec 19, 2010 9:07 pm
by Martin Ryan
I think you're missing a "not" in there somewhere? If you were trying to say...
Radhika wrote: As per my understanding STET is used to by pass an element only from the next statement but not from all.
...then you're under a misapprehension. TM1 applies the first rule that it possibly can to a cell and then ignores all subsequent rules that apply to that cell. This includes stet (which leaves a cell open for input). There is the "continue" keyword which gets around the first-come-first-served principle, but it's not currently relevant to your problem.

I think you can achieve what you're after with this:

Code: Select all

['Unit Sale Price' ] = N:1;C:20;
['Q1','Status' ] = S:'Good'
['Status' ] =s:IF(['Unit Sale Price' ] >0,'Pass','Fail');
The general idea when writing a rule is to write the specific rules first, then the more sweeping rules last.

HTH,
Martin