MessageQuestion()

Previous Next

Opens a question box with the specified text. This box contains three buttons: "Yes", "No", and "Cancel". When "Cancel" is clicked the box is closed without any further action.

To display on-screen field values in messages, refer to these values using embedded method calls and the FORMULA() method. This allows you to concatenate on-screen values with hard-coded message text.

Syntax

MessageQuestion(<text>, <yes-action>, <no-action>,[<title>]))

Parameters

text

The question you want to ask. Note the following:

· As with all non-variable method call parameters, the message itself must be enclosed in single quotes.

 

· If the text is to include single quotes ('), each of these must be written as two single quotes (''), and the message must be enclosed in single quotes.

 

· If the text is to include percent signs (%), each of these must be written as two single percent signs (%%).

 

· If the text is to include double quotes ("), these can be written normally as double quotes (").

yes action

The action that must be executed when the user clicks the Yes button.

no action

The action that must be executed when the user clicks the No button. If you do not specify a "no action", only a "Yes" and a "No" button will be displayed in the resulting question box; and the "Cancel" button will be omitted.

title

The title to appear in the window title bar.

Example

MessageQuestion(FORMULA(':1 || :2 || :3',

'Tours to ', query.destination(), ' entail personal insurance costs. Continue?'),

DataCommit(), DataRollback(), 'Personal insurance')

NOTE:

If you want multiple languages, you should use MessageLanguage() instead.