Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  


RE: How to delete private view automatically?
Lee Helm 17.May.01 12:31 PM a Web browser
Domino Designer -- Views 5.0.3 Windows NT


Each user will have to run this from their id:


Initialize()

count=0
privateviewtext=""
tot = Ubound(db.views) + 1
Forall v In db.views
count=count+1
Print "Checking for outdated personal views " & count & " out of " & tot & "..."
If isPrivateView(v) Then
Set masterView = getMasterView(v) '...get the shared view on which this personal view is based
If Not(masterView Is Nothing) Then
If v.Created < masterView.LastModified Then '...if the shared view design was updated after the private view was created...
'...then remove the private view
privateviewtext=privateviewtext & Chr(10) & v.name
v.remove
End If
End If
End If
End Forall

Print ""

End Sub


Function isPrivateView(v As NotesView) As Integer
isPrivateView = False

Set vdoc = v.parent.GetDocumentByUnid( v.UniversalID )
If Not (vdoc Is Nothing) Then
If vdoc.HasItem("$Flags") Then
If Instr(vdoc.GetItemValue("$Flags")(0), "V") Then
isPrivateView = True
Exit Function
End If
End If
End If

End Function


Function getMasterView(pView As NotesView) As NotesView
Set db = pView.parent
viewList = db.views
Dim view As NotesView
Forall v In viewList
If v.Name = pView.Name Then
Set view = v
If Not(isPrivateView(view)) Then
Set getmasterView = v '...get the shared view on which this personal view is based
Exit Function
End If
End If
End Forall
Set getMasterView = Nothing
Print "Shared copy of view '" & pView.name & "' can not be found."
End Function









How to delete private view automati... (Qu Yue 17.May.01)
. . RE: How to delete private view auto... (Lee Helm 17.May.01)
. . . . RE: How to delete private view auto... (Marion McLaughl... 17.May.01)
. . . . . . RE: How to delete private view auto... (Lee Helm 17.May.01)
. . . . . . . . RE: How to delete private view auto... (Florence Lai 15.Jun.01)
. . . . RE: How to delete private view auto... (Rossitsa Ivanov... 28.Jun.01)
. . . . . . RE: How to delete private view auto... (Jason Lucas 17.Aug.01)
. . . . . . How to delete private view automati... (Adam Foster 8.May.02)






  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search


 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow