Workbench User Guide : 14. Adding Other Components to Your Application : Global Constants : Create a Global Constant
 
Share this page                  
Create a Global Constant
You create, edit, view, and, delete global constants in the Constant Editor.
To create a global constant
1. In the Applications portlet of the Develop tab, select the application in which you want to create, edit, or delete a constant, and then select the header bar of the Components portlet to make it active.
2. Click File, New, Global Constant.
The Create Global Constant dialog appears.
3. Enter a name for the global constant in the Name entry field (for example, My_Constant).
4. (Optional) Enter a comment for the component in the Remark field.
5. Click Create.
Workbench displays the Constant Editor:
6. Select the data type option for the constant: Varchar, Integer, Smallint, Float, Decimal, Date, or Money.
If you select Varchar, an entry field appears, allowing you to enter a length.
If you select Decimal, the Precision and Scale entry fields appear, allowing you to enter this information.
7. Specify a value for the constant.
Note:  The value must be consistent with the data type you have specified.
8. Save the constant by selecting the appropriate command on the File menu.