Update Responses And Response To Responses At All Levels Fron The Parent Document

This script is to update responses and response to responses of parent and
responses documents at all levels from the parent document.
This code getting the value of NPR_number in the parent or current document and
update all responses and responses to responses of parent and all response
documents with this value.


Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim nprnumber As String
Set uidoc = workspace.CurrentDocument
nprnumber = uidoc.fieldgettext("NPR_Number")
Set doc = uidoc.Document
Call updateresponses(doc, nprnumber)

End Sub


Sub updateresponses(doc As NotesDocument, number As String)
Dim collection As NotesDocumentCollection
Dim currentResponse As NotesDocument
Set collection = doc.Responses
Set currentResponse = collection.GetFirstDocument
While Not ( currentResponse Is Nothing )
Call currentResponse.ReplaceItemValue("NPR_Number",number)
Call currentResponse.Save(True,False)
Call updateresponses(currentResponse, number)
Set currentResponse = collection.GetNextDocument(currentResponse)
Wend
End Sub



Surendra Talluri
This was first published in November 2000

Dig deeper on Domino Resources - Part 6

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close