Simulating @Prompt Function Using Lotus Script

There is no equivalent function in Lotus Script to simulate complex @Prompt
functionalities like [OKCancelList] and [OkCancelCombo].However there is a
workaround for this

1.Create a form called Layout.Create a Layout region in this with 3d Background
2.Create a field called Keys of type text,Editable and "Allow Multi values"
check box enebled
3.Have a Keywords field called Keyword and choose "Enter Formula For Keywords"
option..Enter "Keys" as formula.
4.Now include the script in the place you want to simulate the @prompt function
5.you can access the selected option by accessing the Keyword field in the
temporary document created for this purpose(Refer the code)
Dim ws As New NotesUIWorkspace
Dim ses As New NotesSession
Dim tempdoc As New NotesDocument(ses.CurrentDatabase)
Dim ch(5) As Variant
'Enter the list of keywords as'individual elements of Ch array.
'First element is the default value
ch(0) ="default"
ch(1) ="a"
ch(2) ="b"
ch(3) ="c"
tempdoc.Keys = ch
Call ws.DialogBox ("layout",True,True,False,_
False,False,False"Dialog Box",tempdoc)
'tempdoc.keyword(0) returns the selected option...use it for further processing

This was first published in November 2000

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.