Domino Code Fragment

Code Name*
Converts a view to a design list of folders
Date*
02/23/1999
Source (or email address if you prefer)*
Mackie
IP address:.3.144.97.189
Description*
Modifies a view so it that displays the names all the folders in the database
Type*
LotusScript
Categories*
Design Configuration
Implementation:
Modify constants
Required Client:
4.5
Server:
(none)
Limitations:
Comments:
Undocumented...use at your own risk!
Files/Graphics attachments (if applicable): Code:
NOT MY CODE _ PULLED IT OFF NOTES DISCUSSION SITE - BUT PRETTY COOL ANYWAY

Modifies a view so it that displays the names all the folders in the database - useful for lookups etc

<NOTE IF YOU EDIT AND SAVE THE VIEW AFTER RUNNING THE AGENT BELOW
 $FORMULARCLASS GETS SET BACK TO DEFAULT>

run below as agent - RUN ONCE -

if you experiment with the value of $FORMULARCLASS you can get the names of forms etc as well

Sub Initialize
     Dim s As New notessession
     Dim db As NotesDatabase
     Set db=s.CurrentDatabase
     Dim doc As NotesDocument
     Dim view As NotesView
     
     
     Set view = db.getview("test7")
     Set doc=db.GetDocumentbyUNID(view.UniversalID)
     Forall item In doc.Items
          If item.Name = "$FormulaClass" Then
               Set Item = doc.ReplaceItemValue("$FormulaClass", "10" )
          End If
     End Forall
     Call doc.Save( True, True )
     
     
End Sub