Show the same document in a view with different forms

This tip describes how to show the same document in a view with different forms.

I have documents that contain information on 4 different parties.

When displaying in a view, the first column is coded so that each document appears 4 times i.e. "Show multiple categories as separate documents."

The problem was, dependant on which row in the view was selected, the user wanted to display a different form e.g. If the 1st party was selected, they wanted to display a form showing only the 1st party details and so on...


A non-technical solution...

I could have used subforms or hide-whens etc but given that the 4 separate forms already existed and the large number of fields on each I used form formulas as follows.

  1. Use the view's QueryOpendocument event, which gives you a handle to a NotesUIView object. This object has the "caretcategory" property, which returns the value of the categorised column.
  2. Based on the value of "caretcategory" I was able to determine which form I needed to display and set an environment variable e.g. NotesSession.SetEnvironmentVar("DisplayForm" , "Form1")
  3. In the Form Formula for that view, retrieve the environment variable. e.g. @Environment("DisplayForm")

As the QueryOpenDocument even occurs first, the Form Formula can then work out which form to use.

Note: This also works in embedded views.

This was first published in May 2003

Dig deeper on Domino Resources - Part 4

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close