Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to get the handle to response documents?

Posted on 2011-03-22
10
Medium Priority
?
343 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 500 total points
ID: 35196391
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 11

Expert Comment

by:larsberntrop
ID: 35198321
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
ID: 35198410
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:larsberntrop
ID: 35198439
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
ID: 35198687
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
 
LVL 11

Expert Comment

by:larsberntrop
ID: 35199031
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
ID: 35199157
One to try thanks!
0
 

Author Comment

by:shals0628
ID: 35200838
@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 11

Expert Comment

by:larsberntrop
ID: 35202773
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 11

Expert Comment

by:larsberntrop
ID: 35202776
oops!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

971 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