gettextokcancel
gettextokcancel
PROMPT
,
INPUT

The gettextokcancel statement displays a modal dialog that asks the user to enter an item of text.

Parameters

This statement has two parameters:

prompt – is a message that will be displayed in the dialog. This message should explain what the user needs to enter.

input – is a field or variable where the user’s input will be placed. If this is a field, it should be a text field. The input field or variable should be assigned a value before the gettext statement is used. This value will be displayed as the default value in the dialog.

Description

This statement displays a dialog with a single area for text entry. The user may enter something and press Ok, or they may press the Cancel button. The program can determine what button was pressed by using the info(“dialogtrigger”) statement.

This example asks the user to enter an area code, then selects all phone numbers in that area code. The default area code is 909.

    local whatArea
    whatArea="909"
    gettextokcancel "Area code:",whatArea
    if info("dialogtrigger") match "Ok"
        select Phone match "("+whatArea+")*"
    endif

See Also

- activegrid -- manages the operation of a grid that controls a series of options.
- alert -- displays a modal alert window with a message and one or more buttons.
- alertcanceldelete -- displays a modal alert window with a message and two buttons: *Cancel* and *Delete*.
- alertcancelok -- displays a modal alert window with a message and two buttons: *Cancel* and *Ok*.
- alertdeletecancel -- displays a modal alert window with a message and two buttons: *Delete* and *Cancel*.
- alertmodal -- displays a modal alert sheet (not attached to any window) with a message and one or more buttons.
- alertnoyes -- displays a modal alert window with a message and two buttons: *No* and *Yes*.
- alertok -- displays a modal alert window with a message and one button: *Ok*
- alertokcancel -- displays a modal alert window with a message and two buttons: *Ok* and *Cancel*.
- alertoksmall -- displays a modal alert window with a message and one button: *Ok*
- alertrevertcancel -- displays a modal alert window with a message and two buttons: *Revert* and *Cancel*.
- alertsavecancel -- displays a modal alert window with a message and two buttons: *Save* and *Cancel*.
- alertsheet -- displays an alert sheet (attached to the current window) with a message and one or more buttons. Note: with the introduction of OS 11, Big Sur, sheets no longer appear to slide down from the title bar, but open a dialog centered on the active window.
- alertyesno -- displays a modal alert window with a message and two buttons: *Yes* and *No*.
- alertyesnocancel -- displays a modal alert window with a message and three buttons: *Yes*, *No* and *Cancel*.
- analyzedialog -- opens the standard Analyze dialog.
- bigmessage -- displays a message alert.
- cancelok -- displays a modal alert window with a message and two buttons: *Cancel* and *Ok*.
- choosefiledialog -- displays a modal dialog allowing selection of files or folders.
- choosefolderdialog -- pauses and displays the standard “choose folder” dialog.
- closeallasyncprogresswindows -- closes any asynchronous progress windows.
- columnstatsdialog -- opens the standard Column Stats dialog.
- customdialog -- customizes the appearance of the gettext and getscrap dialogs.
- databaseoptionsdialog -- opens the standard Database Options dialog.
- editfavoritesdialog -- handles the Favorites button in a dialog.
- favoritedatabasedialog -- opens the standard Favorite Databases dialog.
- favoritesbutton -- handles the *Favorites* button in a dialog.
- getscrap -- will display a dialog with a text entry area. The entered text is placed in the clipboard.
- getscrapok -- will display a dialog with a text entry area. The entered text is placed in the clipboard.
- gettextdialog -- displays a configurable modal dialog that asks the user to enter an item of text.
- giantmessage -- displays a message alert.
- importdatabasedialog -- opens the standard Import Database dialog.
- info("modaldialogopen") -- returns true if a modal dialog window is currently open.
- joindialog -- opens the standard Join Database dialog.
- message -- displays a modal alert window with a message.
- morphalldialog -- opens the standard MorphAll dialog.
- morphdialog -- opens the standard Morph dialog.
- noyes -- displays a modal alert window with a message and two buttons: *No* and *Yes*.
- okcancel -- displays a modal alert window with a message and two buttons: *Ok* and *Cancel*.
- openasyncprogresswindow -- opens a floating progress window for asynchronous operations (urltask(, timers).
- openfiledialog -- pauses and displays the standard “open file” dialog.
- popupsharingmenu -- pops up a menu for the toolbar sharing icon.
- progressalert -- displays a progress alert if an operation is going to take a long time.
- rudemessage -- displays a message alert.
- rundialog -- uses a form as a template to display a modal dialog window. The statement supervises the operation of the dialog until it is closed.
- rundialogmenus -- enables custom menus in a modal dialog.
- savedialog -- displays a modal dialog that allows a user to specify the name and location of a new file.
- savefiledialog -- pauses a procedure and displays the standard “save file” dialog.
- selectduplicatesdialog -- opens the standard Select Duplicates dialog.
- showhidefieldsdialog -- opens the standard Show/Hide Fields dialog (in the Fields menu).
- sortdialog -- opens the standard *Sort* dialog.
- statusmessage -- displays a message in the status bar at the bottom of the procedure window.
- stopalert -- displays a modal alert window with a warning icon, a message and one or more buttons.
- supergetpassword -- will display a dialog with a text entry area for a password.
- supergettext -- will display a dialog with a text entry area.
- tallmessage -- displays a message alert.
- yesno -- displays a modal alert window with a message and two buttons: *Yes* and *No*.

History

Version | Status | Notes
10.0 | New | This function is new in this release.