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

Views and Columns & Property
Nadeem Shaikh 5.Jul.04 10:39 AM a Web browser
Domino Designer -- LotusScript 5.0.1a Windows NT

Hi,

How can you lookup a view and get documents by a key....then return the values in certain columns
and store them in some sort of array because the getdocumentbykey may return more than 1 document....but here is the main
problem i have....some of the columns in the view have the property "Show multiple values as seperate entries" enabled and this starts causing problems
when you start using methods such as doc.columnvalues(0) because with a column set with that property for eg the following script results in the debugger returning:

Dim viewview As NotesView
Dim viewdoc As NotesDocument
Set viewview = currentDb.GetView("AllPersonV")
j = viewview.FTSearch( tempdoc.SMStaffName(0), 0 )

If j > 1 Then
Set viewdoc = viewview.GetFirstDocument

counter% = 0
Dim column As NotesViewColumn
Redim people(j-1) As Variant
Redim people2(j-1) As Variant
Redim people3(j-1) As Variant

Redim people4(j-1) As Variant
Redim people5(j-1) As Variant
Redim people6(j-1) As Variant

Dim currentpeople As Variant
Dim currentpeople2 As Variant
Dim currentpeople3 As Variant

Dim currentpeople4 As Variant
Dim currentpeople5 As Variant
Dim currentpeople6 As Variant

'Get the values - Role & Site & Division
If tempdoc.SMStaffRole(0) = "SPO" Then

For i = 0 To j-1
currentpeople = viewdoc.ColumnValues( 4 )
people( counter% ) = currentpeople
currentpeople2 = viewdoc.ColumnValues( 5 )
people2( counter% ) = currentpeople2
currentpeople3 = viewdoc.ColumnValues( 6 )
people3( counter% ) = currentpeople3

currentpeople4 = viewdoc.ColumnValues( 8 )
people4( counter% ) = currentpeople4

currentpeople5 = viewdoc.ColumnValues( 9 )
people5( counter% ) = currentpeople5

currentpeople6 = viewdoc.ColumnValues( 10 )
people6( counter% ) = currentpeople6



counter% = counter% + 1
Set viewdoc = viewview.GetNextDocument(viewdoc)
Next
End If

Debugger returns:
People
[0]
- [0] All SPOs
- [1] All POs
- [2] All POs
- [3] All POs
- [5] All POs

[1]
- [0] All SPOs
- [1] All POs
- [2] All POs
- [3] All AAs

But in my view I can see All Pos in a column for one of the documents found by the key and All AAs for the next document found in the key when really I was expecting

People
[0]
- [0] All POs

[1]
- [0] All AAs

but when you look at the view you can see that only one value is in that column for that documentbykey...how can i overcome this bug...which i cant seem to
get round

I have to set the column properties like this as my view selection criteria involves 2 different forms and i want to see all the names of people in the fields in these documents

The driving force of the view is the first column which has the property "Show multiple values as seperate entries" enabled and has the following formula, where Div inidcates fields from one document and Tea indicates fields from another document - as specified in the view selection criteria

aco := @If(DivACPO = "";"";DivACPO + "~ACO");
acopa := @If(DivACPOSec = "";"";DivACPOSec + "~ACO PA");
am := @If(DivAM = "";"";DivAM + " ~AM");
aam := @If(DivAAM = "";"";DivAAM + "~AAM");
dspo := @If(DivSPO= "";"";DivSPO + "~SPO");
dpo :=@If(DivPO= "";"";DivPO + "~PO");
dpso := @If(DivPSO= "";"";DivPSO + "~PSO");
dtpo := @If(DivTPO= "";"";DivTPO + "~TPO");
dtemppo := @If(DivTempPO= "";"";DivTempPO + "~Temp/Agency PO");
doa := @If(DivOA= "";"";DivOA + "~OA");
dsaa := @If(DivSTA= "";"";DivSTA + "~SAA");
daa := @If(DivTA = "";"";DivTA + "~AA");
dotheracostaff := @If(DivAdminOtherStaff= "";"";DivAdminOtherStaff + "~Other Staff");
dtempadmin := @If(DivTempAdmin= "";"";DivTempAdmin+ "~Temp/Agency Admin");
spo := @If(TeaSPO = "";"";TeaSPO + "~SPO");
po := @If(TeaPO = "";"";TeaPO + "~PO");
pso := @If(TeaPSO = "";"";TeaPSO + "~PSO");
tpo := @If(TeaTPO = "";"";TeaTPO + "~TPO");
temppo := @If(TeaTempPO = "";"";TeaTempPO + "~Temp/Agency PO");
oa := @If(TeaOA = "";"";TeaOA+ "~OA");
saa := @If(TeaSTA = "";"";TeaSTA+ "~SAA");
aa := @If(TeaTA = "";"";TeaTA+ "~AA");
otherstaff := @If(TeaOtherStaff = "";"";TeaOtherStaff+ "~Other Staff");
tempadmin := @If(TeaTempAdmin = "";"";TeaTempAdmin+ "~Temp/Agency Admin");

@Trim(aco : acopa : am : aam : dspo : spo : dpo : po : dpso : pso : dtpo : tpo : dtemppo : temppo : doa : oa : dsaa : saa : daa : aa : dotheracostaff : otherstaff : dtempadmin : tempadmin)

Can someone please help, as i hope i have provided enough information for you to assist me.

Thanks in advance




Views and Columns & Property (Nadeem Shaikh 5.Jul.04)
. . RE: Views and Columns & Property (Graham Richards... 5.Jul.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