Manage Learn to apply best practices and optimize your operations.

How to use LotusScript to modify a Lotus Notes view selection

If you've been looking for a way to use parameters to limit a Lotus Notes view selection, you're in luck. This tip gives the LotusScript and a few examples to help you.

Many Lotus Notes Domino organizations find it useful to parameterize a Lotus Notes view selection to limit its results. The reasons for this are generally twofold:

  • Only a portion of all data contained in a view is needed.
  • Exporting to other Notes/Domino applications is difficult due to the volume.

Although there's a great need to use parameters to limit the results of the Lotus Notes view, not much has been done because the view is maintained on the server side. This tip explains the methods that one company used to filter Lotus Notes view selections and gives a few real-world examples.

Note: You must have Designer access to accomplish this. Also, make sure that "Create shared folders and views" is enabled on your access control list.

First, create an action button with the following script:

LotusScript to create action button
(Click on code for enlarged view and script download.)

Following is an example of the above code in action. The following LotusScript will modify the "view" selection formula to display all documents with the department name specified as "Marketing."

LotusScript code in action with Marketing as dept. name
(Click on code for enlarged view and script download.)

This LotusScript code allows you to reset the View to select all documents:

LotusScript to reset the view to select all documents
(Click on code for enlarged view and script download.)

Use the following LotusScript to modify the view selection formula so that it displays the documents using the "Prompt" method:

LotusScript to modify the view selection formula
(Click on code for enlarged view and script download.)

Do you have comments on this tip? Let us know.

This tip was submitted to the tip library by member Vadim Roshass. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Dig Deeper on LotusScript



  • 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 ...