Solved

how to get the handle to response documents?

Posted on 2011-03-22
10
333 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
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 10

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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 10

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 10

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 10

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 10

Expert Comment

by:larsberntrop
ID: 35202776
oops!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

14 Experts available now in Live!

Get 1:1 Help Now