×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Re: Linking main document to a response document

Re: Linking main document to a response document

Re: Linking main document to a response document

(OP)
Afternoon everyone!

Recently I submitted a query regarding the "Link between Main Form (Documents) and Response Form" (posted 11/01/02). (As mentioned before I am quite new to LotusNotes development, so please, please bear with me on this one!!).

Btw, many thanX for both of your recent suggestions, Judalie & Pmonett.

Judalie
I did what you suggested previously: "..being in the main document when creating the response document". On my main form ('AONE'), I have an action button, with the following code/formula attached:


@Command([Compose];"BTWO")

( - my response form being 'BTWO').

What I simply want to do is to click on the action button and open form 'BTWO' to:-

(a) create a new response document to the main document 'AONE',

 - and then later on
(b) be able to go back into the relevant response document to edit it.

But when I click the action button under Notes Preview, all I get is the error msge:

"No document is selected; Please select a document to respond to".

(1) Can somebody please tell me exactly what this msge means/implies?

I've perused thro' the help guide on LotusNotes (Dominos R5), tried the (limited!) tutorial, and had a brief look thro' a (very good, advanced) manual: "Sams L N & Dominoes R5 Unleashed".
I understand that 'the response documents store a reference to the parent document in a field named $Ref, which contains the Document ID of the parent document, and is maintained internally by Notes.'
(2) Would this ID be the same as a unique field on both my parent and response documents?

Pmonett
Thank you for your suggestions, concerning the creation of a ''view' that respects the response hierarchy' and so on.

However I'm not quite ready to design the 'Views' yet as such. What I want to do first and foremost, is to create documents, and then response documents to each of the parent documents. Basically what I want to do is to create a response document whilst in Preview, and then perhaps later maybe open up/edit this response document.

Can this not be implemented without creating views?


(3) Could somebody possibly advise: where under the Form properties of my response form 'BTWO' would I establish a link between a field 'QANo' say, and an identical field 'QANo' on the parent form 'AONE', please?
(Is the link established automatically as the DocumentID within the field $Ref?).

Is the reason why I am obtaining the message, as mentioned earlier, anything to do with the link between my forms?

Many, many thanks in advance, folks.

Kind regards

Magnetar

(Frustration, - this has got to be easy!! )

RE: Re: Linking main document to a response document

Magnetar,

While I'm no substitute for Pascal (who is the Notes MAN!!), I can answer #3 - in your BTWO form properties, 2nd tab Defaults, there is an option in the On Create : Formulas inherit values from selected document.  If you have two fields on two different forms and this is selected, when you create your second document, it will be filled with the value from from AONE.

Per Notes Help on composing a response document:

The following formula composes a response document based on the currently selected document, in a window four inches wide and seven inches high.
@Command([Compose];"";"Response"; 4:7)

As far as the documentid's I think that each document has it's own unique id, but response documents ALSO have their parents unique id stored with it so views can be displayed with the parent document and all response documents listed below it.

Good luck!

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned

RE: Re: Linking main document to a response document

Magnetar,

May I first make a suggestion. If you wish to continue developing a subject you have previously posted, try making responses in that thread instead of posting a new thread.
Here, you refer to a different thread in which you have exposed the issue, but in this thread no one can scroll back and check out the details. Makes it easier if all info concerning a discussion is in the same thread.
That said, the answer to question 1 is simple : you are trying to create a response doc and the client has no parent doc to link it to, so it complains.
How are you creating the response exactly ? Are you previewing a document when creating it ? If so, is the action being used in the preview pane, or in the main window ?
To answer your other questions, as Leslie has correctly pointed out, you must understand that every single doc in a Notes db has a Notes UNID, a Unique Document Number.
When creating a response doc, that response automatically takes a copy of the UNID of the parent doc and stores it in a field called $Ref, as you have noticed.
This manipulation is what is at the root of the error message if no parent UNID is available.
Ideally, to create a response, you could open a doc and have a Respond button that creates the response doc. In that way, you'll be 100% certain that the client knows it has a parent doc to respond to.
Now, there is a catch in that there is two types of response forms : Response, and Response to Response.
What is the difference ? It is in which parent doc is going to be taken into account on creation of the response.
If you create a Response or a RtR to a main document, there is technically no difference and everthing will happen just the same.
However, if you create a Response to a doc that is not a main document (can be Response or RtR), the behaviour changes. If the response you are creating uses a RtR form, then the parent doc will be the selected document and that is the UNID that will be copied. If the response uses a Response form, the client will actually reverse track the response thread up to the initial main document and use that UNID for reference.
In other words, if you use a Response form only, you will never get more than a two-level hierarchy (main and response). You need to use the RtR form to be able to implement threads with multiple hierarchical levels.
This goes beyond the notion of discussion forums. You could need to implement a CRM-type application with Companies as main documents, Contacts as Responses and Activities as RtR. Thus an Activity could be undertaken with any Contact or directly with the Company, and additional information (phone calls, e-mails, ..) can be recorded for a given Activity.
The possibilities are quite important, but understanding the hierarchy is a fundamental step.

Hope this helps,

Pascal.

RE: Re: Linking main document to a response document

(OP)
Afternoon

(Sorry, but I've been away from this for a while!)

Pmonett, in response to your statement:
"How are you creating the response exactly ? Are you previewing a document when creating it ? If so, is the action being used in the preview pane, or in the main window ?
To answer your other questions, as Leslie has correctly pointed out, you must understand that every single doc in a Notes db has a Notes UNID, a Unique Document Number.
" - I do understand that each document does has a notes UNID.
Okay, without going in to too much detail, I would appreciate if either you or lespaul could get back to me and just simply explain further, regarding the following message:
"No document is selected; Please select a document to respond to".
Pmonett, are you saying that the response form will not open, due to lack of data (documents)?

Lespaul, many thanks for your (simple) suggestion to point (3) of my query. I'll give it a go.

Kind regards

Magnetar    



RE: Re: Linking main document to a response document

Just so I have this clearly:

You have a document with a button that is suppose to create a Response document?  When you push the button, you get the error message as stated above?

Could you post the code that is behind the button?

Have you tried using the debugger to see exactly where the problem is occurring?

Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!

RE: Re: Linking main document to a response document

Magnetar,

The simple version is : if no document is selected, no response can be created.
It is logical. If you do not define what you wish to respond to, how can you expect to create a response ?

Pascal.

RE: Re: Linking main document to a response document

I had same problem as Magnetar, I had formula on the main document (@Command([Compose];"";"Response"; 4:7) ).  It does send me to Response page, but I have to define form "Response" as document type.  If I define it as response type, It will give me error message
"No document is selected; Please select a document to respond to".  I wonder where I should select document to bind main document and response together.  or should I write some formula?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close