Multiple Form Best Practice

Hi

I have a requirement to use more than one Form in several of my applications. Example, General invoicing Form showing many details of a particular invoice, including fields and layouts which are needed for the user but should not appear on the printed invoice. Therefore two forms are required, the main form and the actual generated invoice to the customer.

What is the best way to achieve this,

  1. When the printed form is required i e. ‘print preview’ or ‘print invoice’ is actioned a second document is created with the relevant fields from the main document being copied by LS into different fields on a ‘temporary’ print form. After generation the temporary form is included in a tempdocs view which is deleted by an agent every 10 mins or so as it is no longer needed.

or

  1. Have the second form with the same field names as the first and switch forms for printing/preview and then back to the main form once completed.

or

Something else

I still struggle with some of the basic concepts of Notes, even though I have been dabbling for a few years in the design, so any help would be appreciated.

Many thanks

Mark

Subject: Multiple Form Best Practice

I use something like your second option. They click a print action button and it switches to the print form and brings the print dialogue box up where they can preview, changes printers, etc. Once printed, it switches back to the original form.

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim newuidoc As NotesUIDocument

Dim doc As NotesDocument

Set uidoc = ws.currentdocument

Set doc = uidoc.document

'// – This is the form you want to use to print from

doc.form = “Print Finance”

Set newuidoc = ws.editdocument(False, doc)

Call newuidoc.print

Call newuidoc.close

doc.form = “Dealsheet” '// – switch back to the original form

Subject: RE: Multiple Form Best Practice

David,

Your suggestion seems logical, which I will adopt. I was thrown because option 1 is the method used in a development which we commissioned by a developer some time ago.

I am keen to get the concept and best practices right as I have many applications to convert from an existing Lotus Approach relational database.

Many thanks for your input.