Activating the view property "Do not display empty categories" with LotusScript

This tip shows you how to activate the view property "Do not display empty categories" without using Domino Designer.

This tip shows you how to activate the view property "Do not display empty categories" without using Domino Designer. A view with that property has a Field called $Index containing "/C". So we have to set the value of this Field to "/C" for each view we want not to display empty categories. This is particularly useful when using a database residing on Domino R5 and over, and accessed by R4.X clients. You can modify this tip and use the same method to change other properties of a view. Beware, changing some special Fields will cause unpredictable behavior! ($Formula ...)

  
  Option Public 

Dim S As NotesSession
Dim db As NotesDatabase
Dim col As Variant


Sub Initialize
 Dim i As Integer
 Dim it As NotesItem
 Dim v As NotesView
 Set S = New NotesSession
 Set db = S.CurrentDatabase
 Col = db.Views
 For i =  Lbound(Col) To Ubound(Col)
  Dim doc As NotesDocument
  Set V = Col (i)
  ' A notes document 
representing the view
  Set Doc = db.Getdocumentbyunid(V.Universalid)
  ' Do not change private views
  If V.Aliases(0)  <> "V_Private" 
Then Doc.~$Index = "/C"
  Call Doc.save(True, True)
 Next
End Sub

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Zoubir Aichour. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

This was last published in September 2004

Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close