Select All in Embedded View in Notes Client

10 pts.
Tags:
Domino Designer
Lotus Domino
Lotus Notes
Hi In this database I'm working on, only authorised readers can view the documents (via reader fields) and since this is a workflow application, there will be documents that need to be approved. For some approvers, there maybe quite a bit of documents to approve. As such, is there a way that I can have the approver click on a button, and select all the documents in the embedded view ? Any help would be much appreciated. TIA>
ASKED: November 7, 2007  1:53 PM
UPDATED: January 31, 2008  6:57 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

<ul>
<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>

</ul>

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.”
Sub Initialize
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 )
End If
Set doc = collection.GetNextDocument(doc)
Wend
End Sub

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following