Problem solve Get help with specific problems with your technologies, process and projects.

Move a response doc in a hierarchical view

I'm looking for a way to in an hierarchical view, have a "Move" button to move a response doc (and all its children with out loosing its structure)to a different father doc.

Response documents maintain their relationship with their parent document via the $Ref field. This field contains the DocumentUniqueID of the document to whom this document is a response. Using LotusScript, you can manipulate the parent-children relationships of documents easily.. here is a quick example that will take a response document that is a response to ParentDoc1 and make it instead a response to ParentDoc2. You can make it is complex as you need just as long as you maintain the $Ref field, everything will be fine.

(I have left out some declarations for the sake of brevity, such as thisDB definition, the name should be clear enough)

Dim OldParent, NewParent, ChildDoc as NotesDocument
Dim ParentColl, RespColl as NotesDocumentCollection
Set ParentColl = thisDB.UnProcessedDocuments
Set OldParent = ParentColl.GetFirstDocument
Set NewParent = myView.GetDocumentByKey("WhateverKeyFindsNewParent")
Set RespColl = OldParent.Responses
If RespColl.Count > 0 then
Call RespColl.StampAll("$Ref",NewParent.UniversalID(0))
End If

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • 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 ...