When you use variables in an expression, you can use a special type of variable that asks you for its value when the expression is evaluated. These variables, called ASK variables, can be used just like any other variable. When Alpha Anywhere encounters the ASK variable, an input dialog box appears requesting that you type in a value. The expression result will depend upon the value you enter. The outcome of a query, the filter expression for an export, or the value of an update expression are all examples of operations and expressions which can be based on an ASK variable.
An ASK variable begins with one of the following prefixes depending upon the type of data you want to request:
If an expression contains more than one ASK variable, Alpha Anywhere will display a single dialog box to prompt for all of the ASK variables at once.
By following a simple naming convention, you can control the order in which the ASK variable prompts appear on the dialog box. Alpha Anywhere uses the portion of the ASK variable after the prefix to form the prompt used in the input dialog box. The following expression was placed in the Filter Expression field on the Filter/Order tab of the Customer Information Properties dialog box.
lastname > var->askC_Lastname .and. Firstname > var->askC_Firstname
The expression produces the following pop-up dialog box when the Customer Information form is opened.
The dialog box that Alpha Anywhere displays prompts for the firstname field before the lastname field (since that is their alphabetical sort order). However, by renaming the ASK variables as follows, you can ensure that the dialog will prompt for the lastname field before the firstname field.
lastname > var->askC_1_Lastname .and. Firstname > var->askC_2_Firstname