Copy View from Source Application to Destination Application

Mindwatering Incorporated

Author: Tripp W Black

Created: 02/01/2013 at 06:30 PM

 

Category:
Notes Developer Tips
LotusScript

Issue:
Need to copy a view from application / database to a target application.

Solution:

Following is LotusScript code snippet that copies a view design to an another target application.
Dim sDb as NotesDatabase ' source app
Dim tDb as NotesDatabase ' target app
Dim sV as NotesView ' source (template) view to copy to target app
Dim tV as NotesView ' target new view to create from sV

Set sDb = s.Currentdatabase
Set tDb = s.GetDatabase(svrnm, dbnm, False)
If Not (tDB.IsOpen) Then
Print "(MyFunction) Error: Unable to open target application."
Exit Function
End If
' get source and copy
Set sV = sDb.GetView("MyView")
Set tV = tDb.Createview("MyView", , sV)


previous page