I found this code that goes through and prints out csv for both columns. I later parse and count the two columns. I want to count it here instead of printing and counting later. I've been mucking around but couldn't figure it out.
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim rowstring As String
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim view As NotesView
Set view = db.GetView( nameofview )
Set vc = view.AllEntries
Set entry = vc.GetFirstEntry()
While Not entry Is Nothing
rowstring = ""
Forall colval In entry.ColumnValues
If rowstring = "" Then
rowstring = colval
Else
rowstring = rowstring + +"," + colval
End If
End Forall
Wend
Thanks for any help in advance.
Try this, it accumulates the columns into rowval by converting the colval string into an numeric value. You could just as easily use double/CDbl() if they're floating point. This is assuming that, by "count the two columns", you mean sum them up and output the sum. If you mean literally count, then keep it as an
Integer
and change the lineto
Here it is:
As per your original sample, I haven't output anything (?) but I've put a comment where you should do it.