Posted on 2003-03-01
Medium Priority
Last Modified: 2013-12-18
hi experts,

i've a parent form, frmIn and a response form, frmCheckOut.
i've set at the frmCheckOut to change the value of the field 'Status', from 'Available' to 'Check Out' in the frmIn.

i use the formula @SetDocField( $Ref;  "Status"; "Check Out" ) in the input translation of the Status field in frmCheckOut.

My problem is after i've deleted the response document, the Status in frmIn is still 'Check Out'. how do i change it back to 'Available'?

my main purpose is to set the field 'Status' to 'Check Out' if it has a response document; and set it to 'Available' if it doesn't have one.

please help. thank you very much.

Question by:janelow
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 63

Expert Comment

ID: 8050803
When do you need this "Status" field to be showing the correct state?
Do you need it in the view?
Or do you need it when opening "frmIn" document?

LVL 24

Expert Comment

ID: 8052405
When you delete the response, QueryDocumentDelete is executed. Copy and paste this script in your Database Script

Function ChangeState(Source As NotesUIDatabase, Stat As String)
     Dim col As NotesDocumentCollection, doc As NotesDocument, pdoc As NotesDocument
     Dim db As NotesDatabase    
     Set db = Source.Database
     Set col = Source.Documents
     Set doc = col.GetFirstDocument
     While Not doc Is Nothing
          If doc.Form(0) = "Response" Then
               Set pdoc = db.GetDocumentByUNID(doc.ParentDocumentUNID)
               If Not pdoc Is Nothing Then
                    pdoc.Status = Stat
                    pdoc.save True, False
                    Msgbox "No parent document available"
               End If
          End If          
          Set doc = col.GetNextDocument(doc)
End Function

Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)
     Call ChangeState(Source, "Available")
End Sub

Sub Querydocumentundelete(Source As Notesuidatabase, Continue As Variant)
     Call ChangeState(Source, "Check Out")
End Sub


Author Comment

ID: 8056441

sorie, there are still a lot of terms i'm still not familiar with. Database script means library script in the database, is it?

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 8056451

i need the Status value in the view and also in the frmIn document. is there a difference? i thought the view will display the value from the frmIn anyhow.

thanx for your reply.
LVL 24

Expert Comment

ID: 8058066
In the designer, You will see resources under that section select Other link. In the workpane you will see database script. Double click that.

This is all for 40 pts ???

Author Comment

ID: 8078099
sorry. the script didn't work.

the application i'm building is for the web.
i use @Command([MoveTotrash]) and @Command([EmptyTrash]) to delete the document in applet view. would this make any difference?

Author Comment

ID: 8118909
sorry, i still haven't found the solution to this problem which is the only problem left in my system. i hope any experts will help me out. tq very much.
LVL 24

Accepted Solution

HemanthaKumar earned 750 total points
ID: 8139438
Web !!!

It will not work on web, just notes client.

How do you delete the document in web ? Do you use any script ? If so why don't you update the parent while deleting.


Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question