System Variables


There are several variables that are assigned or used by Alpha Anywhere for special purposes. These variables, called system variables, provide a way to exchange information directly with Alpha Anywhere. Each system variable has its own intended usage. You should not use these names for any of your variables. The following table lists some of the available system variables:

  •  A_CAN_DO

    Character Type. Use this variable in a script attached to a field rule, or object event. For the "Can" events (e.g., CanArrive, CanDepart etc.), setting this variable to "F" or "N" cancels the action associated with the event. For example, if an object's CanArrive event script sets this variable to "F" or "N", focus cannot be given to that object. This variable is retained for compatibility with Version 1. The preferred method now is to use the CANCEL() command.


    Pointer Type. A pointer to the current field. See Creating a Field Rule Event.


    Character Type. The filename of the current table or set (including the path). Note. You can also use the <TBL>.NAME_GET() method to obtain the alias name or <TBL>.FILENAME_GET() to get the physical filename.


    Character Type. The path of the current table or set. For a Network Optimized database, A_DB_CURRENT_PATH points to the shadow directory. The main difference between A_DB_CURRENT_PATH and A5.GET_PATH() is that A_DB_CURRENT_PATH is based on the current table or set while A5.GET_PATH()is based on the current .adb file. For applications where all tables and sets are in the same directory as the .adb file (highly recommended!), the only difference will be that A5.GET_PATH()does not end with a backslash.

    When running a script from the Code Editor, A_DB_CURRENT_PATH will return an empty string. If you wish to run/debug a script directly from the Code Editor, use A5.GET_PATH()or A5.GET_MASTER_PATH() if possible. (It Is always possible if the application is in one directory.)

    Logical Type. Indicates whether a record is being changed or marked for deletion. See Field Rule Record Events.


    Character Type. The button pressed in an Xdialog form. See UI_DLG_BOX() and UI_MODELESS_DLG_BOX().


    Character Type. See List Box T Directive.


    Pointer Type. A dot variable. Reading A_FIELD_VALUE will return A_FIELD_VALUE.Value and any other variables stored under this pointer.

  •  A_FIELD_VALUE.Value

    Character Type. Assigned while in Enter or Change mode, this variable is the value entered into a field before either the cursor leaves the field or the record is saved. Use this variable in a script attached to a field rule event.


    Character Type. The name of the currently displayed form. This is always the top-level form, and not the name of any sub-form that may be present. The expression obj(A_FORM_CURRENT) returns a pointer to the current form.

  •  A_USER

    Pointer Type. Provides information about the current window and keyboard. See Object Events.

See Also