14. ABF Development Example : Creating a User-Specified Frame : Defining Topframe : Create a Global Variable
 
Share this page                  
Create a Global Variable
Topframe contains a global variable, arr_count. This variable is an index counter for the dynamic array used in another Sales Entry frame, NewOrder. Topframe initializes arr_count to a value of "0."
To create this global variable
1. Display the Edit an Application frame.
2. From the Edit an Application frame, select the Globals operation to display the Create or Edit Global Components pop-up menu.
3. Highlight Variables and choose Select.
4. You see the Edit Global Variables frame. Select Create to display the Create a Global Variable pop-up.
5. In the Name field, enter arr_count.
6. In the Type field, enter smallint. Use the ListChoices menu operation if you want to select from a pop-up menu of data types.
7. In the Nullable field, take the default yes.
8. In the Short Remark field, optionally enter a brief description, such as Order array index counter.
9. The frame appears as in the following figure. Select OK to create the variable.
10. The Edit Global Variables frame appears. The global variable arr_count is displayed in the table field. Select End to return to the Edit an Application frame.
Topframe is almost complete, but you still must define the form. The FormEdit menu operation of the Edit a USER Frame Definition frame gives you direct access to VIFRED so that you can define the form's layout.
To create the form
1. Move to the Edit a USER Frame Definition frame for Topframe.
2. Choose FormEdit. Because you have not changed the default name of the form, VIFRED begins editing Topframe. The VIFRED Creating a Form pop-up tells you that the form does not exist, and offers a menu of form types.
3. Choose the Blank operation from the submenu and use VIFRED operations to create a form similar to the following. The text on this frame is composed completely of trim elements.
You have created a menu frame with four elements, not the five that Topframe has when the application is complete.
4. Select End. Save your changes in VIFRED, which returns you to ABF.
For more information, see the description of VIFRED in the Character-based Querying and Reporting Tools User Guide.