Sign in to participate
Svar til: Kan man dynamiskt ændre en Selection Formula for et view ?
Topic:LotusScript eksempel på ændring af View selection formular
Oprettet:10/09/2017
Author:Finn L Knudsen - ALCES IT Consulting

Jeg havde et gammel kode stump liggende, hvor viewet skifter mellem at vise dokumenter med 2 forskellige subjects: 


Dim sess As New NotesSession

Dim db As NotesDatabase

Set db = sess.Currentdatabase

Dim view As NotesView

Dim doc As NotesDocument

Set view = db.Getview("TestView")

Dim Selectionformula As String

Selectionformula = view.Selectionformula

Print "Selectionformula: " & Selectionformula

If Selectionformula = |SELECT Subject = "TestB"| Then 

Selectionformula = |SELECT Subject = "TestA"|

Else

Selectionformula = |SELECT Subject = "TestB"|

End if

Set doc = db.Getdocumentbyunid(view.Universalid)

view.Selectionformula = Selectionformula 

Call doc.Sign

Call doc.Save(True, True) 



Diskussions forløb

10/09/2017Show details for [<a class="81FBB6483D908CFEC12581B4002854FA" href="81FBB6483D908CFEC12581B4002854FA?OpenDocument">Kan man dynaKan man dynamiskt ændre en Selection Formula for et view ? (Lars Hendriksen)


Notesnet.dk - Rustenborgvej 7a - 2800 Kgs. Lyngby - info at notesnet.dk