14. ABF Development Example : Another User-Specified Frame : Define the NewOrder Frame : Define the NewOrder Form
 
Share this page                  
Define the NewOrder Form
To build the form for NewOrder, redisplay the Edit a USER Frame Definition frame. The NewOrder form is shown in the following figure.
To define the form
1. Enter the form name orders and select FormEdit. At the VIFRED Creating a Form menu, select Table.
2. At the Creating a Form Based on a Table pop-up, specify the Orders table and the field type simplefields. Select OK.
3. The default form includes the fields Custnum, Custname, Product and Quantity.
Use VIFRED operations to give the fields different titles and reposition them, as shown in the preceding figure. Remove the current_date field, or give it the Invisible attribute. Notice that the Internal Name of each field is the same as the corresponding Customer table column.
4. To add a list of products to be displayed when the user selects ListChoices for the Product field, enter the product list in the Validation Check to Perform field in VIFRED. Use this format:
product in ["bookcase", "chair", "lamp", "sofa",
"stool", "table", "lawn mower"]
5. Save and exit. You return to the Define a USER Definition frame.
6. Choose End to compile the NewOrder frame and return to the Edit an Application frame. The Error Listing frame appears if the source code file contains errors.
After the form is built, you can test the frame.