CreateView and formforlua

Hi everyone!!

Im Creating a view using db.Createview method and using a template view , but the forformula of the template view is not geting copied in to the new view i created.

Can anyone pointed out me what could be wrong?

here is the code

Dim sn As New NotesSession

Dim db As NotesDatabase

Dim mstrvw As NotesView

Dim newvw As NotesView



Set db = sn.CurrentDatabase

Set mstrvw = db.GetView("(Template!)")	

Set newvw = db.CreateView("TestView",,mstrvw,1)

Subject: CreateView and formforlua

This code (in Mail Template) to see only encrypted emails works for me:

Dim s As New notessession

Dim db As notesdatabase

Dim view As notesview

Dim viewTemplate As notesView

Set db = s.currentdatabase

Set viewTemplate = db.getview(“($All)”)

Set view = db.CreateView({(Encrypted)}, {SELECT Encrypt=“1” | @IsAvailable(SecretEncryptionKeys)}, viewTemplate)