Manage Learn to apply best practices and optimize your operations.

Roll-Up Responses

Notes can handle main and response documents, but what if a customer wants to
have all response doc info nicely reported together with main document
That's where script can add tremendous value.

Sub Initialize

'-- This script generates a ReportDoc which includes a subset of the
MAIN document together with available responses--'
'-- Last change: 14-06-1999 - added to the report : complaint_no_1 ,
Date_Created and actions_requested_by_customer
'-- Jaap Steenis
Dim session As New NotesSession
Dim db As NotesDatabase
Dim DateOfToday As NotesDateTime
Set DateOfToday = New NotesDateTime("08/18/1995 01:36:22 PM")
Dim doc As NotesDocument
Dim view As NotesView
Set db=session.CurrentDatabase
Set view = db.GetView( "Pending" )
Dim username As String
username = session.username

Dim ReportDoc As NotesDocument
Dim richText As NotesRichTextItem

Dim rcollection As NotesDocumentCollection

Dim rt As NotesRichTextItem
Set doc=view.GetFirstDocument
Do While Not(doc Is Nothing)
If doc.Form(0) = "FM001" And Instr(username, doc.Country_Code(0)) >
0 Then
' Messagebox("Document Number") &doc.complaint_no(0)
Set ReportDoc = New NotesDocument( db )
Set richText = New NotesRichTextItem(ReportDoc,"Body")
Call richText.AppendText("COFI DETAILS")
Call richText.AddTab(1)
Call richText.AppendText("CONSOLIDATION DATE :")
Call richText.AppendText(Cstr(ReportDoc.Created))
Call richText.AddNewLine(2)
Call richText.AppendText("Customer :")
Call richText.AppendText(
Call richText.AddNewLine(1)
Call richText.AppendText("Product :")
Call richText.AppendText(doc.product_Code(0))
Call richText.AppendText(" - Batch :")
Call richText.AppendText(doc.batch_no(0))
Call richText.AppendText(" - Order No :")
Call richText.AppendText(doc.Order_no(0))
Call richText.AppendText(" - Packaging Type :")
Call richText.AppendText(doc.Package_Code_Ds(0))
Call richText.AddNewLine(1)
Call richText.AppendText("Size of delivery : ")
Call richText.AppendText(Cstr(doc.size_of_delivery(0)))
Call richText.AppendText(" Kg")
Call richText.AppendText(" - Delivering-Invoicing Site : ")
Call richText.AppendText(doc.manufacturing_company(0))
Call richText.AppendText(" - Delivery date: ")
Call richText.AppendText(Cstr(doc.delivery_dt(0)))
Call richText.AddNewLine(2)
Call richText.AppendText("Raised on : ")
Call richText.AppendText(Cstr(doc.complaint_raised_dt(0)))
Call richText.AppendText(" - Created on : ")
Call richText.AppendText(Cstr(doc.complaint_dt(0)))
Call richText.AppendText(" - Initiator: ")
Call richText.AppendText(doc.initiator(0))
Call richText.AddNewLine(2)
Call richText.AppendText("COFI DESCRIPTION :")
Call richText.AddNewLine(2)
Call richText.AppendText(doc.description(0))
Call richText.AddNewLine(2)
Call richText.AppendText("ACTIONS REQUESTED BY CUSTOMER : ")
Call richText.AddNewLine(2)
Call richText.AppendText(doc.actions_requested_by_customer(0))
Call richText.AddNewLine(2)
Set rcollection = doc.Responses
Set rdoc=rcollection.getfirstdocument
Do While Not (rdoc Is Nothing)
Set rt=rdoc.getfirstitem("Body")
Call richText.AddNewLine(1)
richText.AppendText("------------------------------------ COMMENTS AREA BELOW
Call richText.AddNewLine(1)
Call richText.AppendText("From: ")
Call richText.AddTab(1)

Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...