Count Category in Notes View

Dear friends

Need your advise to count category in view by Lotus Formula or Lotus Script.

Subject: Count Category in Notes View

You can use the ColumnValues to detect the categories in a view.

Subject: RE: Count Category in Notes View

can you help me how to write that script, I am still new in script.

thks

Subject: RE: Count Category in Notes View

Roughly it can look like this (I entered it here, so it could have a few typos):

dim session as New NotesSession

dim db as NotesDatabase

dim view as NotesView

dim entries as NotesViewEntryCollection

dim entry as NotesViewEntry

dim col as integer

set db = session.CurrentDatabase

set view = db.GetView()

set entries = view.AllEntries

set entry = entries.GetFirstEntry

While Not entry Is Nothing

col = 0

Forall colval In entry.ColumnValues

'here you have a column index and its value; it is up to you to do something with it

col = col + 1

End Forall

set entry = entries.GetNextEntry(entry)

Wend

I suggest that you start with printing all colval’s in columns (so also prijnting the empty ones!) and see how it looks. You will notice the way the categories are put in these values. You might want to do it with a view with at least two categories and a limited number of entries.