Manage Learn to apply best practices and optimize your operations.

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 last published in May 2003

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials'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 ...