Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

parent doesn't know response, but response knows its parent

Posted on 2001-07-03
11
Medium Priority
?
240 Views
Last Modified: 2013-12-18
Form A and his response form B.
We create a document A' with form A. On this form A there is a button to create a response document with form B, this response document we call B. the code for this action is in brief
        ws.Composedocument("","","B")    
        where ws is the current workspace
In a view with selection @All I see them both as main and response ( OK so far).
Then later I trigger another action button on Form(document) A. In this action I want to do things with the response form. The LS - code looks like this :
     Dim ws As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Dim newdoc As NotesUIDocument
     Dim responses As Notesdocumentcollection    
     Dim numberresponses As Integer
     
     Set uidoc = ws.currentdocument
     Set responses = uidoc.document.responses
     numberresponses = responses.count
     Messagebox("number resp."+Cstr(numberresponses)

The messagebox returns me 0 for the number of responses to document A But I know there has to be one.
Furthermore the $Ref field of the responsedocument B gives me the ID of maindocument A.
So the response knows its parent, but the parent doesn't know its response.
What can I do. I already thied the makeresponse method of NotesDocument to explicite link main and response but still the same problem.
0
Comment
Question by:ruddi
[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
11 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6249477
Looks like everything is ok, except for missing bracket in msgbox stmt.

Open the document from the view which has response hierarchy and try to run this action from the opened doc , just a try !

~Hemanth
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6249812
What happens if you split this one line

Set responses = uidoc.document.responses

into:

Dim doc As NotesDocument
Set doc = uidoc.document
Set responses = doc.responses
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6250996
Hello ruddi,

I checked your code, and it works fine on my computer.

So, please check on your side this things:
1.) Is your Form B realy a form of type "Response"?
2.) Wath do you meen with "later" in your description: do you close and open the parent document? Or even worser: meen you later in the same code where you produced the B doc? If so, then use delete and reopen of parent documents Object in the LotusScript code.

Regards,
zvonko
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!

 

Author Comment

by:ruddi
ID: 6251617
to hermanth  : the result stays unfortunately the same.
to crak : the result stays unfortunately the same.
to zvonko 1) B form is a response doc
          2)later means really later. After the maindoc has been closed and saved and so.  
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6252627
Sorry, but in my scenario did the code worked without problems. It worked in a button and in an action. And without closing the main parent document I got every time the correct nomber of descendants.
So it has to deal with something that is different in your coding...
0
 
LVL 10

Accepted Solution

by:
zvonko earned 300 total points
ID: 6252665
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6253181
Have you checked for this "Don't support specialized response hierarchy"?
After unchecking it you have to recompact with -H option.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6263091
Hey ruddi,

forgotten my points? <|;-)
0
 

Author Comment

by:ruddi
ID: 6264211
Sorry zvonko but I only have read your reply until today.
But it works with the don't support specialized response hierarchy and the compacting.
So your certainly earned your points
0
 

Author Comment

by:ruddi
ID: 6264221
the workaround stated in this document on the support.lotus.com works. It is however necessary to close and restart your lotus notes server for this solution to work.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6265481
Thank's for the points and for the feeback <|;-)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
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…
Suggested Courses

609 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