Solved

how to get the handle to response documents?

Posted on 2011-03-22
10
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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
Industry Leaders: 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

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus notes email code 2 224
Combine textlist text elements in Lotus Notes ReadViewEntries 3 132
Lotus Notes Database "Invalid NSF Version" 5 2,269
LotusScript: Merge Data to Word File 22 123
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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…

752 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