Solved

Call MakeResponse

Posted on 2003-11-19
9
768 Views
Last Modified: 2013-12-18
Can Anybody help ?

"Make the response by Lotus Script"

I have 2 Views in database,The view name is View1 and View2
View1 has 5 Documents and one of them have customer field in it. Customer name is Peter.
View2 have 10 documents,5 document customer name is Peter , I want to make 5 documents in View2 as the response document of the Peter document in ViewA .

How i can do ?
0
Comment
Question by:bjork_hugo
[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
9 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 25 total points
ID: 9777258
For what purpose? There must be some idea behind your wish...

Anyway, the easy approach:
1. I assume the forms in View2 are different from the forms in View1
2. make the sub-document form a Response form
3. make View1 "Show response hierarchy"
4. mark those 5 documents in View2 and Cut them (^X)
5. go to View1, click Peter and Paste (^V)

No programming required!
0
 
LVL 14

Assisted Solution

by:p_partha
p_partha earned 25 total points
ID: 9779842
if us till want in lotusscript here is the code :

      Dim session As New notessession
      Dim db As notesdatabase
      Set db = session.currentdatabase
      Set view1 = db.getview("<your first view>")
      Set view2 = db.getview("<your secondview>")
      Set doc = view1.getdocumentbykey("peter")
      Set doccoll = view2.getalldocumentsbykey("peter")
      Set respdoc = doccoll.getfirstdocument
      While Not respdoc Is Nothing
            Call respdoc.makeresponse(doc)
            respdoc.save True, True
            Set respdoc = doccoll.getnextdocument(respdoc)
      Wend

Partha
0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9779903
code is not debugged, and I am assuming that Peter appears in the first sorted columns of view1 and view2

<initialization stuff>

Set pdoc=view1.GetDocumentByKey("Peter")

Set coll=view2.GetAllDocumentByKey("Peter")
 
For i=1 to coll.Count

     coll.GetNthDocument(i).MakeResponse(pdoc)
     coll.GetNthDocument(i).Save(True,True)

Next

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 14

Expert Comment

by:p_partha
ID: 9780447
ksi2001
What was not debugged in my code,Moreover Getnthdocument is a performance killer, by all means my code is better

Partha
0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9780524
partha: i did not see your code when typed mine. It's mine code which is not debugged :-)

0
 
LVL 14

Expert Comment

by:p_partha
ID: 9781563
Sorry Ksi2001.. just a miscommunication    :-)

Peace
Partha
0
 

Author Comment

by:bjork_hugo
ID: 9784043
thank all...
that's best guideline.

bjork_hugo
   ^_^
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

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…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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