A new feature was requested to create a new view with the NotesDatabase.CreateView method and immediately use it from the Notes client.
LotusScript cannot open this new view without reopening the database, even after creating a new view with the CreateView method.
For example, the following uiws.PickListStrings also results in an error.
(Delete View1 in Domino Desinger when testing repeatedly.)
(Dim description omitted)
Set db = session.Currentdatabase
Set vw_src = db.GetView("View1")
Set vw_new = db.CreateView("NewView", "SELECT @ALL", vw_src)
Picklist = uiws.PickListStrings(3, True, db.Server, db.FilePath, "NewView", "Test", "Test", 1)
The following uidb.OpenView will result in an error.
Set db = session.Currentdatabase
Set vw_src = db.GetView("View1")
Set vw_new = db.CreateView("NewView", "SELECT @ALL", vw_src)
Set uidb = uiws.CurrentDatabase
Call uidb.OpenView("NewView")
When the Notes client closes that database and reopens it, the new view is available. For example, the following can access the new view you just created.
Set db = session.Currentdatabase
Picklist = uiws.PickListStrings(3, True, db.Server, db.FilePath, "NewView", "Test", "Test", 1)