Q

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

This was first published in December 2001

Dig deeper on Lotus Notes Domino Administration Tools

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

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

SearchWindowsServer

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

SearchDataCenter

SearchExchange

SearchContentManagement

Close