Same form for response and main?

I would like to use the same form for main, response and response to response. Is this possible ? The problem is that when my form is defined as response, I can’t use @Command([COMPOSE]… to create a document, Notes asking me to select a document before as main doc.

Any “simple” solution ? (I know I could create BIG sub-form with everything inside, and then create 3 forms with that sub-form included each one with a different type…).

Many thanks in advance

Subject: Same form for response and main ?

Your Form is to be a document

What is going to make the diference is in your document as you make a response

get IDDOC of parent, Subject, Category things that will categorise your document

Then you categorised in the view such as :

Category

→ Subject

→ (IDDOC father)

Subject: RE: Same form for response and main ?

The difference is that if you use response doc (wich is the purpose of my database : following the answers to any type of documents in my company) you can have natural identation in views (using forum like concept)

Subject: Same form for response and main ?

Why do you need to use response and response-to-response if it’s the same form?

Why would you want to compose a response without selecting a main document first?

If you post what you are trying to achieve …?

Subject: RE: Same form for response and main ?

Thank you for your answer,

What I’m trying to achieve is to use the same Form for both Main documents and responses to those documents. Unfortunately, when I define my form as “document” (or “Main” ? I don’t know the translation…) I can’t use it to create a response doc (that must be identical in its structure), and when I define my form as “response”, I can’t use it to create a main document…

Subject: RE: Same form for response and main ?

If your reason for doing this is to keep the fields the same, one way of doing this is as you suggested - to use subforms.

However you will have to be careful if you are expecting to inherit any values from the main document into the responses.

Still can’t see why the response(s) should be identical. have you considered versioning? This will automatically create a copy of the main document as a response for you…

Subject: Same form for response and main ?

If you use Lotuscript, you can trick the parent /response relationship with Notesdocument.MakeResponse.

What you will need though is a field that will contain the parent’s UNID. Use this parent ID in some Lotuscript in the querysave event to make the current document a response of the parent document.

Is that clear enough? I can explain in French if you want.

: )

Subject: RE: Same form for response and main ?

Thank you Benoit, may be it’s better to continue in english, if we don’t, people here will throw us stones…I’ve exactly done what you said, the problem was that when I record again my response document after any modification (it was created with a “document” typed form and linked to its parent with .makeresponse), the relationship is lost and $ref field deleted.

What you say is that the parent ID in the response will keep the link working ? I will try that… Must I use a special name field ? A special script to keep the $Ref field alive ?

Merci pour tout en tout cas…

Subject: FOUND - Same form for response and main ?

Since my last post I’ve added a calculated field $Ref in my form (“Document” type, not “Response”) with formula =$Ref, and my document is kept as response even after saving it again…