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


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.


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
gettextokcancel "Area code:",whatArea
if info("dialogtrigger") match "Ok"
    select Phone match "("+whatArea+")*"

See Also


10.0NewThis function is new in this release.