Solved

how to get the handle to response documents?

Posted on 2011-03-22
10
331 Views
Last Modified: 2013-12-18
Hi,

I have a Main document, more than one response document can be present for the Main.
When archive functionality is to be used, how do I get the handle of all of the response documents and use 'CopytoDatabase' function in order to archive?
0
Comment
Question by:shals0628
  • 5
  • 4
10 Comments
 
LVL 43

Accepted Solution

by:
Steve Knight earned 125 total points
Comment Utility
Not sure if I read this right so sorry if I am stating the obvious,  but to get a documents responses you need to use

set dc=doc.responses

to get a notesdocumentcollection of any responses for document "doc" and to use copytodatabase if you want to use that you need to iterate down the document collection, i.e. very roughly:

dim doc as notesdocument
dim dc as notesdocumentcollection
dim respdoc as notesdocument
rem doc set somehow, e.g. from current document

set dc=doc.responses
If dc.Count <> 0 Then
  set respdoc=dc.getfirstdocument
  do
    set respdoc=dc.getnextdocument(respdoc)  
  loop until respdoc is nothing

end if
0
 
LVL 10

Expert Comment

by:larsberntrop
Comment Utility
You would not believe how obvious some of the answers here are.  It seems to be considered a bad practice to actually read the Designer help if you want to do programming in the Domino Designer...
0
 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
they do make it a bit complicated.... You have to use the "help" menu or F1 (who wold think to try that!) and then search or i hear there is a facility known as google too ;-)

as someone who has used notes since early r3 lotusscript took a bit of working out after formula having not used  object oriented programming before... Just procedure based pascal, basic etc. at the time so i do feel for someone trying to make head or tail of something theyve been chucked into mind!

0
 
LVL 10

Expert Comment

by:larsberntrop
Comment Utility
I must add that "just using F1" is a bit broken since 8.5, with the awful implentation of the Eclipse help system.  I'd love for the old intelligence to return asap.  OTOH, the popup help for Classes and properties and methods, INCLUDING your own Custom classes, is beyond wonderful.  I LOVE IT!
0
 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
V. true... and going OT here but frankly PITA going Eclipse based in general... to the extent where on a pretty decent dual core 2Gb laptop that runs Windows 7 fine (which kinda shows it aint bad!) I run the basic version command line switches day-to-day for client until I need admin or designer and on an old P4 kept it to R8.0.2.

Anyway I digress.... if the poor guy is with us still and wants any pointers, ask!

Steve
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:larsberntrop
Comment Utility
don't forget the JVM trick.  Helps Designer & startup speed. => Kudos to Andrew Pollack of The North <http://www.thenorth.com/apblog4.nsf/0/BB5DDB03611B2BB1852574D7005FF852> read the comments there for more info.
Note that i set both vmarg.Xmx (max heap) and vmarg.Xms (start heap) to the same size. That saves having to grow the heap (and a lot of garbage collects until its grown to max).
0
 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
One to try thanks!
0
 

Author Comment

by:shals0628
Comment Utility
@dragon-it - Thanks for the piece of code.  I used this Set ResponseDoc=QueryVw.Getchild(QueryDoc)
to get the handle the response document.
@larsenbertrop - Thanks for your comments, I did try using Notes Help. For some weird reason when I performed ResponseDoc. the list of methods did not populate after the dot (.) which led me to check on this forum. Google is good to search, trusting this forum. :-) Thanks for other information related to Help as well.
0
 
LVL 10

Expert Comment

by:larsberntrop
Comment Utility
Try the JVM trick.  Helps Designer & startup speed. => Kudos to Andrew Pollack of The North http://www.thenorth.com/apblog4.nsf/0/BB5DDB03611B2BB1852574D7005FF852 read the comments there for more info.

Note that I set both vmarg.Xmx (max heap) and vmarg.Xms (start heap) to the same size. That saves having to grow the heap (and a lot of garbage collects until its grown to max)
0
 
LVL 10

Expert Comment

by:larsberntrop
Comment Utility
oops!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now