How to update status field in a form?

hi

am new to lotus…

i have apllication for eg…consider a application where PL has to insert some datas in form and GL has to review and approve it…

if he approves…status should automatically changes to approved/rejacted…

how to do tht ?

plz help me

thanks.

Subject: How to update status field in a form ?

This is basic development, please read the help or buy a book…

Subject: RE: How to update status field in a form ?

"Alain Lapierre " you were really harsh with that girls’ query.You were also harsh throught this forum…pls post ur response if u really want to else don’t POKE your nose…

Hi Bharathy Shanmugam…r u doing this thru lotusscript or formula language?

well u can achive this by lotusscript as:-

On Error Goto e	

Dim ws As New NotesUIWorkspace

Dim session As New notessession

Dim db As NotesDatabase	

Dim doc As NotesDocument

Dim currdoc As NotesDocument

Dim uidoc As NotesUIDocument

Dim istatus As NotesItem

Set db=session.CurrentDatabase

Set uidoc=ws.CurrentDocument

Set currdoc=uidoc.Document



            Call uidoc.FieldSetText("request_M","Approved")		

	

Msgbox "Report Approved"	

Call uidoc.Save

Call uidoc.Close

	

End If 'Confirm box end if

Exit Sub

e:

Msgbox  Erl+Error

write the above code on the click on Approve button and for Reject button write the same code accept make changes in the line as

Call uidoc.FieldSetText("request_M","Rejected")

+++++++++++++++++++++++++++++

Do u want 2 do that thru formula language? then tell me

If u face any problem then reply me …

Subject: RE: How to update status field in a form ?

Um, no – this forum is not a substitute for training. It’s a true pity that people like you seem to think that it is. Your answer and the code you supplied makes a number of assumptions that you simply cannot make, like that the OP is familiar with Designer, that she would know that in your FieldSetText call that “request_M” is the name of the field (and not “Approved”), that the document needs to be in edit mode before the change can be made, and that FieldSetText can’t be called from a view action.

I know that you expect us to be a substitute for your own education, but we (and the internet at large) are not substitutes for Designer Help or the IBM-supplied literature (like the Redbooks and the newer wikis). That is greed and conceit on your part.

Subject: RE: How to update status field in a form ?

It is not being harsh, it is being realist. I have studied, I have worked and I have learned to use the help files, and to search this forum for my answers.

I do not post here unless I am stuck, and I have tried to find the answers by myself first. And I find it very disappointing to read some of the questions posted in here, that are so basic that someone with some BASIC development skill should be able to resolve.

Nothing personal here toward anyone, but if the hat fits, wear it. I hate that people improvise themselves Notes Developer and rely on others to make the actual work for them, for free.

Subject: RE: How to update status field in a form ?

Don’t be so rude guys…Vinod Vijay is right at his place

Subject: RE: How to update status field in a form ?

No, he’s not. Like it or not, Notes and Domino development is a professional endeavor – even when it is a “side task” – and we have a right to expect a bit of professionalism from its practitioners. That includes a little more effort put into learning than going to the internet and asking people to do your work for you. Even if all you want is teh codez, a bit of searching isn’t too much to ask – and this guy hasn’t done that.

Subject: RE: How to update status field in a form ?

Stan Rogers, Alain Lapierre…iam sorry for what i have done…i admit this…i really apologize to all of u guys…today onwards i 'll show my professionalism…okay…

its a gentlemen’s promise

Subject: How to update status field in a form ?

If you read this forum and knew what you were looking for you’d find dozens of cases of this type of question… Everything about validating if all the requried fields are filled in, only allow the approve button to be visible for the GL person, etc. etc.

The question is how does the GL person approve the data? Is it Web or Client Design?

Will they click on a button? If so the button will have the code that changes the status message.

You can do basic changing of values using: @Functions, Lotus scripts, etc.

As a beginner you would probably want to look at:

Field Status := “Approved by GL”;

@PostedCommand([FileSave]);

@PostedCommend([FileClose]);

Try the above… Play, read the designer help… But you probably need something fundamental - either a class, or a introdction to developing in Lotus Notes Book.