Approval

Post Reply
daya007
Posts: 49
Joined: Fri May 28, 2010 4:47 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003
Location: IL, USA

Approval

Post 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 8785 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 8785 times
Please Let me know if am confusing.

Thanks
Daya
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Approval

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Approval

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
daya007
Posts: 49
Joined: Fri May 28, 2010 4:47 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003
Location: IL, USA

Re: Approval

Post 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 8763 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 8763 times
User avatar
Michel Zijlema
Site Admin
Posts: 713
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: Approval

Post 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
daya007
Posts: 49
Joined: Fri May 28, 2010 4:47 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003
Location: IL, USA

Re: Approval

Post by daya007 »

@ Michel

I tried using 'Write', but same error repeating.
daya007
Posts: 49
Joined: Fri May 28, 2010 4:47 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003
Location: IL, USA

Re: Approval

Post by daya007 »

@Tomok

I tried using Continue, but dint make difference.
User avatar
Michel Zijlema
Site Admin
Posts: 713
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: Approval

Post 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
User avatar
Michel Zijlema
Site Admin
Posts: 713
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: Approval

Post by Michel Zijlema »

As Martin mentioned, you need cell security here - not dimension security.

Michel
daya007
Posts: 49
Joined: Fri May 28, 2010 4:47 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003
Location: IL, USA

Re: Approval

Post by daya007 »

Got it...Thanks All....
Post Reply