How to Open a subform on user clicking on doclink?

I have a form where user clicks on a button and then can enter values in the subform. User can then save the sub form and the sub form should be visible to the user in the form of doclink. User can enter more than one subforms to the same document and then these documents become visible to the user in the form of doclinks.

User clicks on the doclink and the subform opens in the document.

Any idea how to do it ???

Regards,

Jawad Rana.

Subject: How to Open a subform on user clicking on doclink ?

“Subform” has a specific meaning in the Domino development context. A subform is a reusable part of a form – not a separate document. What you probably want to create are response documents.

The easiest way to get “links” to related documents is to embed a view on the parent form and have it display only the responses to the current document.

If you really require doc links as opposed to a view, then you can use NotesRichTextItem to add links to a rich text field, and then redisplay the document to show the rich text changes, as described here:

Alternately, think about whether you really need separate documents, or whether you can use a table on the same document, as described here:

Creating Truly Dynamic Tables in Notes 6 — No More Simulations!