Sorry: I did not see the words Embedded View in the question. You will have to use information on the form to create search criteria that would collect the documents that the user is able approve. I would think you would present a prompt to the user containing a view or folder of the documents they can approve, then allow them to select muiltple records. Then loop that collection and mark the approvals.
My original answer was written assuming you were doing this from a view. Some of this could help with the code you write.
Fi doing this from a view, you would create a lotusscript agent that runs only on selected documents.
<li>Dim a collection and set it tequal to the unprocessed documents. All selected documents in the view are included in the collection.</li><li>Add a dialog box or prompt to ask the user what s/he wants to do.</li><li>based on the answers, loop through the collection and set the value OR use the stampall method to set the value on the entire collection.</li>
The example below does not utilize a prompt or the stampall method. You can search for those methods and functions in Designer help. Also search for the Unprocessed documents lotusscript help to review how it functions and the proper settings in the Agent Properites to enable the UnprocessedDocuments method.
<i>From Lotus 6.5 Designer Help:</i>
<b>Examples: UnprocessedDocuments property </b>
This agent script allows a user to approve multiple requisitions at once by processing the currently selected documents in the Requisitions view. UnprocessedDocuments returns the documents that are currently selected in the view. The script iterates over each document and, if the Approver item contains the current user’s name, it sets the Approved item to “Yes.”
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Set item = doc.GetFirstItem( “Approver” )
If item.Contains( session.UserName ) Then
doc.Approved = “Yes”
Call doc.Save( False, True )
Set doc = collection.GetNextDocument(doc)