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

Item not being set
Nadeem Shaikh 10.Mar.04 08:39 AM a Web browser
Domino Designer -- LotusScript 4.6.5a Windows NT

Hi,

I have the following code below which runs through a view, gets documents based on a key and retrieves some field values
but my problem is that when i run debugger and get to the line
Set teamdoc = dc.GetNextDocument( teamdoc)
item is then set to blank, so when the debugger gets to the line
If Not (item Is Nothing) Then
it goes to the end if statement....

In my code i am trying to get hold of field values for TeaSPO, TeaPO, TeaPSO and TeaTPO for all the documents in the colection (dc).
Is there a better way of doing this within my code.

Please help

Thanks
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Sub SiteAllStaffGroups

Dim s As New notessession
Set Agent = s.currentAgent
AgentName = Agent.Name

groupList("Bilston Hostel All Staff") = ""
groupList("Birmingham Prison All Staff") = ""
groupList("Bishop Street All Staff") = ""

Dim item As NotesItem
Set v = Unicorndb.getview("SitesV")
Set sitedoc=v.GetFirstDocument

count = 0
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do Until sitedoc Is Nothing

Dim teamview As NotesView
Set teamview = UnicornDb.GetView ( "AllLiveTeamsBySiteV" )

Dim dc As NotesDocumentCollection
Set dc = teamview.GetAllDocumentsByKey(sitedoc.SitName(0), True)
Set teamdoc = dc.GetFirstDocument

Do Until teamdoc Is Nothing
'for each team in this colloection get the following fields and store them - spo, po, pso, tpo
Set item = teamdoc.getFirstItem("TeaSPO")
Call item.AppendToTextList (teamdoc.TeaPO )
Call item.AppendToTextList (teamdoc.TeaPSO )
Call item.AppendToTextList (teamdoc.TeaTPO )
Set teamdoc = dc.GetNextDocument( teamdoc)
Loop

If Not (item Is Nothing) Then
Forall h In item.Values
If h <> "" Then

'Check Division Name+++++++++++++++++++++++++++++++++++++++++++++++
'-- Add value to list item.
If sitedoc.sitname(0) = "Bilston Hostel" Then
If groupList("Bilston Hostel All Staff") = "" Then
groupList("Bilston Hostel All Staff") = h
Else
groupList("Bilston Hostel All Staff") = groupList("Bilston Hostel All Staff") & "~" & h
End If
'Check Division Name+++++++++++++++++++++++++++++++++++++++++++++++
'-- Add value to list item.
Elseif sitedoc.sitname(0) = "Birmingham Prison" Then
If groupList("Birmingham Prison All Staff") = "" Then
groupList("Birmingham Prison All Staff") = h
Else
groupList("Birmingham Prison All Staff") = groupList("Birmingham Prison All Staff") & "~" & h
End If
'Check Division Name+++++++++++++++++++++++++++++++++++++++++++++++
'-- Add value to list item.
Elseif sitedoc.sitname(0) = "Bishop Street" Then
If groupList("Bishop Street All Staff") = "" Then
groupList("Bishop Street All Staff") = h
Else
groupList("Bishop Street All Staff") = groupList("Bishop Street All Staff") & "~" & h
End If

End If
End If
End Forall
End If

Set sitedoc = v.getnextdocument(sitedoc)
count = count + 1
Loop

End Sub




Item not being set (Nadeem Shaikh 10.Mar.04)
. . RE: Item not being set (Rupert Dick 10.Mar.04)






  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