Programatically create form with reference!

I have a parent form open… need to automatically create a second form (different from the parent) with reference to the parent form programmatically when a field on the parent form changes. I need to either create this second form Or edit/update the form if already created. Can anyone help with some sample code???

Any and all help is appreciated!

Thanks!!!

Subject: Programatically create form with reference!

Hi steve,

A few things regarding your question.

  1. “Need to create a second form” in the sense, what do you mean here. Do you need to create a new form or just you want to compose an already existing form?

  2. Again, “I need to either create this second form or edit/update the form if alreaddy created”. here again what do you mean by create a form? Also, it doesn’t give the right meaning to say edit/update the form.(instead do you intend to edit/update the document created using the particular form?).

  3. What do you mean by saying “reference to the parent form”. Because, reference in the sense indicates a response document to a main document. So do you wish to create a response document for a main document.(But again you have said another form has to be created with reference to the parent form. So is that all to just compose another form with respect to a field value in a parent form?)

  4. And one suggestion, it would be better, if you could use the exact technical terms when depicting your issue or requirement, so that users can get an better insight of your problem/requirement.

Let, me say my points over this requirement.

If you intend to create a response document, for a parent document, then very well you can use, the following @commands/methods.

a. @Command([ComposeWithReference];“parmeters”) - in formula language.

b. MakeResponse method in NotesDocument Class.

Or else, if you just need to compose a form(not a response document), then you can use the following @commands/methods.

c. @Command([Compose];“parameters”) - formula language

d. ComposeDocument method in NotesUIWorkSpace Class.

You can refer Notes help for the exact usage of the above mentioned @commands/methods. Notes help has quite good examples.

Hope that helps,

Jason.

Subject: RE: Programatically create form with reference!

Let me clarify… I want to create a response document based on an already existing form. I need this to be done behind the scenes without any form popping up and displaying to the user. Thus I need to programatically set the field values and ultimately save the document.

I appreciate your help!

Thx.