Use Dialogbox Within A Script Agent

If you are writing a LotusScript agent and need to prompt the user for some
input, you know you can use InputBox. But what about when you have a defined
list, and would like the user to select from that list.

On a form, you'd just use a DialogBox. You can also use a DialogBox within an
Agent. To do this, create a backend document using the NotesDatabase
CreateDocument method. This creates a document, but since it's not a UIDoc,
it's not seen by the user. Then call DialogBox, with the LAST PARAMETER of the
DialogBox call set to the document you just created.
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim doc As NotesDocument
Dim iReturn As Integer
Dim currentdb As NotesDatabase

Set currentdb = session.CurrentDatabase

Set doc = currentdb.CreateDocument

iReturn = ws.DialogBox ( "dlgTest", True,
True, False, False,
False, False, "Testing" , doc)

If iReturn Then
Messagebox "Item Selected is : " +
doc.GetItemValue("TestList")(0), 64,
"Testing"
Else
Messagebox "You hit cancel", 64,
"Cancel"
End If

Dig Deeper on Domino Resources

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close