Skip to main content

Prompt (NotesUIWorkspace - LotusScript)

Displays a dialog box and returns a value based on your actions in the dialog box.

Note: This method is new with Release 5.

Defined in

NotesUIWorkspace

Syntax

variant = notesUIWorkspace .Prompt( type%, title$, prompt$ [, default ] [, values ] )

Parameters

type%

Constant. Indicates the type of dialog box that you want to display. May be any of the following:

PROMPT_CHOOSEDATABASE (13)

Note: The constant name PROMPT_CHOOSEDATABASE is not implemented but the literal value 13 can be used instead.

PROMPT_OK (1)

PROMPT_OKCANCELCOMBO (5)

PROMPT_OKCANCELEDIT (3)

PROMPT_OKCANCELEDITCOMBO (6)

PROMPT_OKCANCELLIST (4)

PROMPT_OKCANCELLISTMULT (7)

PROMPT_PASSWORD (10)

PROMPT_YESNO (2)

PROMPT_YESNOCANCEL (11)

title$

String. The text that you want displayed in the dialog box title bar. Required for all *type%*s, although you can specify a null string with "". The maximum number of characters is 65.

prompt$

String. The text that you want displayed within the dialog box. Required for all *type%*s, although you can specify a null string with "". The maximum number of characters is 255.

default

The value that will be used as your default input value. The input section of the dialog box is primed with the value; you can accept it by selecting OK, replace it with another value, or Cancel.

Not applicable to dialog boxes of type% PROMPT_OK, PROMPT_YESNO, PROMPT_YESNOCANCEL, or PROMPT_PASSWORD Optional for all other *type%*s. However, for PROMPT_OKCANCELCOMBO and PROMPT_OKCANCELEDITCOMBO a default is recommended so that the input section is not blank.

The value listed as the default must be included in the values list; otherwise, it is ignored.

The default value(s) for PROMPT_OKCANCELEDIT, PROMPT_OKCANCELLIST, PROMPT_OKCANCELCOMBO, PROMPT_OKCANCELEDITCOMBO, and PROMPT_OKCANCELLISTMULT is a string, a string array, a variant of type string, or a variant array of strings.

values

The values that you want displayed in the dialog box list box. You can select one of these values as the input. Required only with *type%*s PROMPT_OKCANCELLIST, PROMPT_OKCANCELCOMBO, PROMPT_OKCANCELEDITCOMBO, and PROMPT_OKCANCELLISTMULT.

The values for PROMPT_OKCANCELLIST, PROMPT_OKCANCELCOMBO, PROMPT_OKCANCELEDITCOMBO, and PROMPT_OKCANCELLISTMULT are a string array, a variant of type string, or a variant array of strings.

Return value

PROMPT_OKVariant of type Integer. Always returns 1.
PROMPT_YESNOVariant of type Integer. Yes returns 1. No returns 0.
PROMPT_YESNOCANCELVariant of type Integer. Yes returns 1. No returns 0. Cancel returns -1.
PROMPT_OKCANCELEDITVariant of type String or EMPTY. Yes returns the value entered by the user. Cancel returns EMPTY.
PROMPT_OKCANCELLISTVariant of type String or EMPTY. OK returns the value selected by the user. Cancel returns EMPTY.
PROMPT_OKCANCELCOMBOVariant of type String or EMPTY. OK returns the value selected by the user. Cancel returns EMPTY.
PROMPT_OKCANCELEDITCOMBOVariant of type String or EMPTY. OK returns the value selected or entered by the user. Cancel returns EMPTY.
PROMPT_OKCANCELLISTMULTVariant array of type String or EMPTY. OK returns the value or values selected by the user. Cancel returns EMPTY.
PROMPT_PASSWORDVariant of type String or EMPTY. OK returns the value entered by the user. Cancel returns EMPTY.
PROMPT_CHOOSEDATABASEVariant array of type String or EMPTY. The return value is a three-element array of strings, containing the server, filepath, and title of the database, in that order. Cancel returns EMPTY.

Example