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

  

Sign in to participate PreviousPrevious NextNext

Do Until Loop using NotesViewEntryCollection Not Working
Carla C. Porter 6.Dec.05 03:07 PM a Web browser
Domino Designer -- LotusScript Release 5 Windows XP

Hello All,

I'm stumped and could really use another set of eyes. The code in between ***** below builds an array (mArray) that includes the document counts for the categories in the gArray. Both arrays are populating just fine. When all is said and done, I want to copy the values of these arrays to a field in a form.

The problem is that my mArray loop keeps going and the debugger flags the <<<<<<< line of code below >>>>>>>> as "object variable not set" even though my view collection is "nothing". When I debug the script the VC variable has been reset and is blank.

I'm new at creating code that loops through a document collection to build arrays and then do stuff with that information. I'm sure it's something simple, but for the life of me, I don't know how to get past it.

Thanks in advance for your assistance


Sub Initialize

Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim viewTotal As NotesView
Dim vc As NotesViewEntryCollection
DimVCTotal As NotesViewEntryCollection
Dim report As Notes Document
Dim dt As New NotesDateTime("")
Set db = s.CurrentDatabase
Set report = db.CreateDocument
report.Form = "Monthly Report NEW"

Dim mArray() As String
Dim gArray() As String

'get view
Set view = db.GetView("view")

'create view navigator
Dim vNav As NotesViewNavitagor
Set vNav = view.CreateViewNav

'get first entry of navigator
Dim vEntry As NotesViewEntry
Set vEntry = vNav.GetFirst

'get all categories in the view navigator
'Do Until vEntry Is Nothing
ReDim Preserve gArray(count)
gArray(count) = vEntry.ColumnValues(0)
count = count + 1
Set vEntry = vNav.GetNextCategory(vEntry)
Loop

'use the size of the gArray to redimension the mArray to hold doc counts
Redim mArray(count - 1)

'reset count variable to use below
count = 0

'**********
'get number of docs for each team
Forall team In gArray

'get view entry collection for each team
Set vc = view.GetAllEntriesByKey(team)

'set initial count to collection count
<<<<<<<<<<<< mArray(count) = vc.Count >>>>>>>>>>>>>>

Do Until vEntry is Nothing
Set vEntry = vc.GetFirstEntry()
Set vEntry = vc.GetNextEntry(vEntry)
Loop
count = count + 1
End Forall

'**********
'add results to monthly report

......

End Sub




Do Until Loop using NotesViewEntryC... (Carla C. Porter... 6.Dec.05)
. . RE: Do Until Loop using NotesViewEn... (Marilyn Laudadi... 7.Dec.05)
. . . . RE: Do Until Loop using NotesViewEn... (Carla C. Porter... 9.Dec.05)
. . . . . . RE: Do Until Loop using NotesViewEn... (Marilyn Laudadi... 9.Dec.05)






  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

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 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