Embedded Views and Unprocesseddocuments method

I have a form that has an embedded view on it. There is a button that creates new documents based on fields on this form and displays them in the embedded view. I’m trying to implement a second button that will submit all of the documents that the user selects in the embedded view. I tried using the Unprocesseddocuments method and it returns info from the current document instead of the documents selected from the view. I also tried the UnprocessedFTSearch method with similar results. I need help. How do I fix this?

Thanks,

MJ

Subject: Embedded Views and Unprocesseddocuments method

I’m working with this same situation right now. Embedded views are kind of a strange deal for sure. Here’s what I’ve done: Instead of placing the buttons on the form in which the view is embedded, I placed them in the action bar of the embedded view. In ND6 you can tell an embedded view to display the action bar. Buttons in the embedded view action bar have the ability to access the selected documents in the embedded view from the back end (via the db.unprocessed documents property) and also can access the document where the view is embedded from the front end (via the workspace.CurrentDocument and uidoc.Document properties). It’s kind of cool to be able to do that. I was never able to figure out a way to access the selected docs in the embedded view from a button on the form containing the embedded view (like you’re trying to do now).

Hope that helps out. Keil

Subject: RE: Embedded Views and Unprocesseddocuments method

I tried that and it still doesn’t work. Not sure what I’m doing wrong.

MJ

Subject: RE: Embedded Views and Unprocesseddocuments method

Post your code from the action button here, and we’ll see if we can’t figure it out.

My action button in the embedded view get’s a handle to the selected docuements via a simple:

Dim session as New NotesSession

Dim dbCurrent as NotesDatabase

Dim ndcSelected as NotesDocumentCollection

Dim docSelected as NotesDocument

Set dbCurrent = session.CurrentDatabase

Set ndcSelected = dbCurrent.UnprocessedDocuments

Set docSelected = ndcSelected.GetFirstDocument

Do While Not(docSelected Is Nothing)

’ work with selected document here…

Set docSelected = ndcSelected.GetNextDocument(docSelected)

Loop


When I do this, I’m getting all of the documents that the user selected in the embedded view.