The Create an Application Constant Frame
To create an application constant, select Create from the Edit Application Constants frame. The Create an Application Constant pop-up frame appears, as shown in the following figure. This frame is identical to the Create a Global Variable frame, except that this frame has an additional Value field.
This frame has the following fields:
Constant Name
(Required) Specifies a name that follows the standard naming conventions and is not the name of another constant, global variable, frame, record type, or procedure. The first requirements are validated on the form; the other is verified when you select OK.
Short Remark
(Optional) Provides a brief description
Type
(Required) Specifies the data type of the constant. Valid types for constants are decimal, integer, float, char, varchar, and smallint. ABF does not support Null constants. The field is blank when you enter the frame.
Value
(Required) Specifies a constant value that agrees with the type in the Type field. For example, "xyz" is not a valid value for an integer constant. The field is blank when you enter the frame. The maximum constant value is displayed underlined on three lines.
This frame has the following available menu operations:
OK
Creates the new constant
Cancel
Cancels the creation and return to the previous frame
ListChoices
Displays a list of legal values for the field from which you can choose or field data specifications
Help
Displays help for this frame
Create an Application Constant
To create an application constant, select the Create menu item from the Edit Application Constants frame to display the Create an Application Constant pop-up frame.
To create an application constant
1. In the required Name field, enter a name that meets the limitations described in the previous section. The name must be unique.
2. You can enter a brief description of the constant in the Short Remark field.
3. In the required Type field, enter the data type of the constant.
If the type requires a length, indicate the length in parenthesis. If you don't specify a length, ABF uses the length of the value you specify in Step 4.
4. In the required Value field, enter a constant value that agrees with the type in the Type field.
If you specify a value longer than the length you specified in the Type field, ABF displays a pop-up asking if you want to truncate the value or increase the length of the data type.
5. Make sure all field values are valid before you select OK. Otherwise, ABF does not create the constant.
6. Select OK to create the constant. Cancel, instead of OK, terminates the create operation and returns to the Edit Application Constants frame.
Following successful creation, ABF displays the Edit Application Constants frame table field, where the description of the new constant is listed.
Last modified date: 04/03/2024