Page 1 of 1

Approval

Posted: Thu Sep 30, 2010 12:39 am
by daya007
Hi
I have a req where in the below cube, user has to enter comment in 'edit comment' field. When ever higher official likes the comment, he has to enter 'Y' in Approve field so that comment from edit comment will be copied to Comment filed.
Q.JPG
Q.JPG (19.4 KiB) Viewed 8777 times
I used the foll rule

Code: Select all

['Comment']=S:(IF(DB('Test Comment',!Test Date,!Test KRI,'Approve')@='Y', DB('Test Comment',!Test Date,!Test KRI,'Edit Comment'), STET));
If user writes something in edit comment, as Approve has already Y in it, it directly goes to Comment field.
I want to gray out(non editable) the EditComment field when ever Y is typed in Approve field.
I tried to assign some rule so that it grays out if Approve is Y, But am getting error.

Rule is used

Code: Select all

['Edit Comment']=S:(IF(DB('Test Comment',!Test Date,!Test KRI,'Approve')@='Y',DB('Test Comment',!Test Date,!Test KRI,'Edit Comment'),STET));
['Comment']=S:(IF(DB('Test Comment',!Test Date,!Test KRI,'Approve')@='Y', DB('Test Comment',!Test Date,!Test KRI,'Edit Comment'), STET));
q2.JPG
q2.JPG (20.37 KiB) Viewed 8777 times
Please Let me know if am confusing.

Thanks
Daya

Re: Approval

Posted: Thu Sep 30, 2010 12:46 am
by Martin Ryan
['Edit Comment']=S:(IF(DB('Test Comment',!Test Date,!Test KRI,'Approve')@='Y',DB('Test Comment',!Test Date,!Test KRI,'Edit Comment'),STET));
This is a circular reference and you won't be able to make it work.

The other way to approach this is to use Cell Security to change the user's access from write to read once their comment has been approved. There's some discussion of that approach here: http://forums.olapforums.com/viewtopic.php?f=3&p=7441

Martin

Re: Approval

Posted: Thu Sep 30, 2010 4:17 pm
by tomok
Just replace the STET with CONTINUE and it will work fine. I've done this type of thing many times. A STET cancels the rule calculation but still leaves the rule on while a CONTINUE cancels the rule calculation and opens the cell for input.

Re: Approval

Posted: Thu Sep 30, 2010 4:38 pm
by daya007
Hi Martin

I tried to write a rule in Control cube But am getting an error.
q3.JPG
q3.JPG (23.23 KiB) Viewed 8755 times
Rule:

Code: Select all

['Edit Comment','Abc'] = S:IF(DB('Test Comment',!Test Date,!Test KRI,'Approve')@='Y', 'READ', STET);
Error:
q5.JPG
q5.JPG (32.34 KiB) Viewed 8755 times

Re: Approval

Posted: Thu Sep 30, 2010 6:51 pm
by Michel Zijlema
tomok wrote:Just replace the STET with CONTINUE and it will work fine. I've done this type of thing many times. A STET cancels the rule calculation but still leaves the rule on while a CONTINUE cancels the rule calculation and opens the cell for input.
@Tomok: I'm sure that after replacing STET with CONTINUE the rule won't work fine, as there is a circular reference in the rule, as Martin mentioned. Also your STET/CONTINUE explanation is the other way around - CONTINUE cancels the calculation of the current rule where the rules engine will continue to look for another applicable rule, while STET cancels the calculation and opens the cell for input...

@daya007: What happens if you replace the STET in your security rule with 'WRITE'?

Michel

Re: Approval

Posted: Thu Sep 30, 2010 7:20 pm
by daya007
@ Michel

I tried using 'Write', but same error repeating.

Re: Approval

Posted: Thu Sep 30, 2010 7:21 pm
by daya007
@Tomok

I tried using Continue, but dint make difference.

Re: Approval

Posted: Thu Sep 30, 2010 9:43 pm
by Michel Zijlema
Hi, I was sleeping here...
The problem is that the dimensions Test Date and Test KRI are unknown in the control cube.
So you can't use those as a variable.

Michel

Re: Approval

Posted: Thu Sep 30, 2010 10:04 pm
by Michel Zijlema
As Martin mentioned, you need cell security here - not dimension security.

Michel

Re: Approval

Posted: Fri Oct 01, 2010 1:10 am
by daya007
Got it...Thanks All....