views:

41

answers:

1

Hi

My question is

i have 4 Text Box 1) Prepared By 2) Checked By 3) Approved BY 4) Created BY

First i will login as Smitha then in " Preapred by " - Smitha name should come automatically n all other text box should be blank, then i will submit the form it goes to our respective HOD

now , Nagaraj sir will login as Nagaraj.S then in "Checked by" - Nagara.S name should appear automatically n Approved by and Created by should be blank then he submits the form, then it goes to level 1 person

now , Jagadish is in Level 1 , he will login by his user name then in "Approved By" text box his name should appear automatically here Prepared by value and Checked by value which is taken previously should not be altered , and Created by should be blank

now he submits the form to level 2 person ie Karthick , then his name should appear in "Created By" by not altering any values

can u help me on this ?

A: 

Don't use LotusScript. @Formula is WAY more appropriate here (you might use LS in the buttons, but you don't need it in the fields)

You would want to ADD a field to the form called "Status". The field would be ComputedWhenComposed, numeric with the formula: 1

Then you create an action button "Submit" (you could compute the label) "Submit for "+@Select(Status;"Check":"Approval":"Take Ownership")

The button formula is: FIELD Pending := @true; FIELD Status := Status + 1; @if(@Command([FileSave]);@Command([FileCloseWindow]);"")

In the POSTOPEN event you put: @if(@IsDocBeingEdited;"";@Return); FIELD Pending := @false;

Now you have your 4 fields; which are ALL computed:

@if(Pending=@True;@ThisValue;Status=1;@UserName;@ThisValue) @if(Pending=@True;@ThisValue;Status=2;@UserName;@ThisValue) @if(Pending=@True;@ThisValue;Status=3;@UserName;@ThisValue) @if(Pending=@True;@ThisValue;Status=4;@UserName;@ThisValue)

You also could have a button that walks the chain backwards if it gets rejected. Follow the same logic.

Enjoy!

stwissel