Manage Learn to apply best practices and optimize your operations.

Restore as Last Viewed By User (with frames)

What happens when a user wanted the database to open to the view he was in last...with a frameset?

When opening a database in a Notes Client that is using Frames, typically you set the Database Launch Property to Open designated Frameset and select the Frameset to open. When you create the Frameset you typically put the default View in the main content frame and that view is what all users see when they open the database.

Recently I was challenged by a user of an application I just put into production, that he wanted the database to open to the view he was in last. I thought, how can I achieve this still using the Frameset UI. There isn't a way to do this using standard Launch Properties so I had to do it manually and here is how.

In the Post Open event of each view I have the following code:

Sub Postopen(Source As Notesuiview)
	Dim notesSession As New NotesSession
	Call notesSession.SetEnvironmentVar( "RALastView", Source.ViewAlias )
End Sub

In the main content frame I use a Named Element of View type and the value is computed With the following formula:

viewName := @Environment( "RALastView" );
@If( @IsError( viewName ) | viewName = "";
               "Use Alias of Default View Here";

Now I have a simple way to allow the user to Restore as Last Viewed while getting the rich UI of Frames.

Steven L Rieger
Manager Information Systems

Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

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