14. ABF Development Example : Another User-Specified Frame : Define the NewOrder Frame : Create a Global Array
 
Share this page                  
Create a Global Array
NewOrder uses an array that you create as a global variable through the Globals menu. An array is a collection of records that you can treat as a single unit. In 4GL, arrays must be made up of records, not of simple data types. The array in NewOrders is based on the record type cust_record, created in Create a Record Type.
Cust_array is a global variable. However, you can also use 4GL code to declare an array locally. For information on declaring an array locally, see the 4GL part of this guide.
To create cust_array
1. From the Edit an Application frame, select the Globals operation to display the Create or Edit Global Components pop-up menu.
2. Highlight Variables and choose Select.
3. When the Edit Global Variables frame appears, select Create to display the Create a Global Variable pop-up.
4. In the Name field, enter cust_array.
5. In the Type field, enter cust_record. For an array, you must type this in, as the ListChoices menu of Ingres types does not list user-created record types.
6. When the Nullable field turns into the Array field, enter yes.
7. In the Short Remark field, optionally enter a brief description, such as Array of customer records. Use the LongRemark pop-up to enter a longer comment if you like.
8. When the frame appears as in the following figure, select OK to create the variable.
9. To return to the Edit Global Variables frame, select End.
This frame is where this array is listed in the table field.