Dialog in view

good morning! i have an action/agent set up in a view to run on just the selected document. i can’t figure out how to get a handle to the value in the dialog to place it in the document selected. i’ve done this many time inside a form where i can use uidoc, but not from a view. can someone please give me advice?

thanks,

jason

Dim session As New notessession

Dim workspace As New notesuiworkspace

Dim db As notesdatabase

Dim collection As notesdocumentcollection

Dim uidoc As notesuidocument

Dim doc1 As notesdocument

Dim doc2 As notesdocument

Dim comments As String

Set db = session.currentdatabase

Set collection = db.unprocesseddocuments

Set doc1 = collection.getfirstdocument

dialog = workspace.dialogbox(“Citation”, True, True, False, False, False, False, “Please Enter Comments”)

'need to get handle of comments (text field) from dialog

If dialog = False Then

Exit Sub

Else

comments = 'my dialog_comments(0)

doc1.comments = comments

Call doc1.save(True, False)

End If

Subject: dialog in view

Don’t use environment variables when you don’t need to.One of the parameters you can pass into the DialogBox method is a reference to a back-end document.

All you need to do is create that document before you call the DialogBox method and check the values when you get back.

Example:

Set docDialog = db.CreateDocument

'-- Note! You don’t have to save the document

If workspace.DialogBox(“Citation”, True, True, False, False, False, False, “Please enter comments”, docDialog, False, False, False) = False Then Exit sub

'-- Now you can use the values from the dialogbox.

doc1.comments = docDialog.dialog_comments(0)

Hope this helps

// Ken, http://www.noteshound.com

Subject: dialog in view

write te field value from the dialog box to an environment variable then call the value and write it to the document(s).