i’m trying to get the documents from a view. Right now, my the first and second columns of view is categorized ascendingly. So, when i try to retrieve the documents based on first column’s key, i couldn’t get all the documents.
For example, my first column is Student Name and second column is Subjects Key. I search based on “Alex”, a student. He has taken two subjects with keys Literature01 and Science01. But i can only retrieve the documents categorized under Literature01 and not Science01. What I want to do is retrieve all documents under Alex.
How can i achieve this? Thanks
Subject: trouble getting required documents from a view
DocumentCollection dc = view.getDocumentsByKey(“sortedStudentName”)
dc is including all documents with item valued “Alex” without care of Column 2 in view ! Is not it ?
Subject: RE: trouble getting required documents from a view
Yes, that exactly what I did, but I still couldn’t get all the documents, just the first few documents categorized under the first second column. The other documents categorized under other second column I couldn’t retrieve.
Subject: RE: trouble getting required documents from a view
I think you will have to create another (hidden) view for you lookup that has one category only.
Subject: RE: trouble getting required documents from a view
thanks for all your responses…i’ve created another view as suggested by harkpabst to get what i want…
Subject: RE: trouble getting required documents from a view
Hi,
If u use dc.getdocumentbykey then u will get only one document better use dc.getalldocumentsbykey then loop it.
cheers
RAJ