Working with User Prompts

The following describes several functions that can be used to display information to the user. These functions will display a dialog box window. In some cases, information is static. In other cases, the user can interact with the dialog box, and data values are returned to the underlying form.


[Pages 111 - 112]

Function

Description

Example

@Dialogbox

Displays a user-defined dialog box. Results from the dialog box are subsequently returned to the underlying form.

@DialogBox (form; style: title)  

formThe name of the form to display in a dialog box.

styleOptional keyword that indicates what the dialog box should look like. If multiple options are specified, a colon should separate them.

In the following example, a form called RepeatOptions is displayed.

@Dialog box ("RepeatOptions"; [AUTOHORZFIT]: [AUTOVERTFIT]; "Recurring calendar event");  

 

[AUTOHORZFIT]Auto-set horizontal size.

[AUTOVERTFIT]Auto-set vertical size.

[NOCANCEL]Do not display Cancel button.

[NONEWFIELDS]Do not create new fields on underlying form if the field does not already exist.

[NOFIELDUPDATE]Do not update fields on underlying form.

[READONLY]Disable the ability to edit content in the dialog box.

[SIZETOTABLE]Auto-set size based on the table.

[NOOKCANCEL]Do not display the OK and Cancel buttons on the dialog box.

[OKCANCELATBOTTOM]Place the OK and Cancel buttons at the bottom of the form. If parameter is omitted, buttons will display on right side of window.

titleThe title of the dialog box window.

 

@Prompt

Displays a popup dialog box to the user. This function can be used to capture data values or to capture the Cancel). Syntax:

@Prompt([style]: [NOSORT]; title; prompt; defaultChoice; choiceList; filetype)  

styleA keyword that indicates what the dialog box should look like. Valid keywords include the following:

[CHOOSEDATABASE] [LOCALBROWSE] [OK] [OKCANCELCOMBO] [OKCANCELEDIT] [OKCANCELEDITCOMBO] [OKCANCELLIST]  

The following are several examples.

@Prompt ([OK]; "Warning"; "You must specify a request date"); @Prompt ([YESNO]; "Continue?"; "Do you want to save this form?"); @Prompt ([OKCANCELEDIT]; "Input"; "What is your name?";); FIELD filename:= @Prompt([LOCALBROWSE]; "Select a file.";"");1  

 

[OKCANCELLISTMULT] [PASSWORD] [YESNO] [YESNOCANCEL]  

NOSORTAn optional keyword. Values are sorted if this parameter is omitted.

titleThe title of the dialog box window.

promptThe text to be displayed within the dialog box.

defaultchoiceThe default button or choice in the dialog box.

filetypeThe type of files to be displayed. This parameter is only required for the [LOCALBROWSE] style.

 

Категории