Form example: custlistmod.per

The custlistmod.per form specification file contains a TABLE container and screen array used to display a list of customer rows.

The custlistmod.per form definition file:
  1 SCHEMA custdemo
  2 
  3 LAYOUT (TEXT="Customer list")
  4 TABLE
  5 {
  6 [f1   |f2              |f3            |f4          |f5    |f6    |f7         |f8        ]
  7 [f1   |f2              |f3            |f4          |f5    |f6    |f7         |f8        ]
  8 [f1   |f2              |f3            |f4          |f5    |f6    |f7         |f8        ]
  9 [f1   |f2              |f3            |f4          |f5    |f6    |f7         |f8        ]
 10 [f1   |f2              |f3            |f4          |f5    |f6    |f7         |f8        ]
 11 [f1   |f2              |f3            |f4          |f5    |f6    |f7         |f8        ]
 12 }
 13 END
 14 END
 15 
 16 TABLES
 17 customer
 18 END
 19 
 20 ATTRIBUTES
 21 EDIT f1=customer.cust_num, NOENTRY, TITLE="Id";
 22 EDIT f2=customer.cust_name, NOT NULL, TITLE="Name", SCROLL;
 23 EDIT f3=customer.addr, NOT NULL, TITLE="Address", SCROLL;
 24 EDIT f4=customer.city, NOT NULL, TITLE="City", SCROLL;
 25 COMBOBOX f5=customer.state, NOT NULL, TITLE="State",
 26    ITEMS=("IL","IA","WI");
 27 EDIT f6=customer.zipcode, NOT NULL, TITLE="Zipcode";
 28 EDIT f7=customer.contact_name, TITLE="Contact", SCROLL;
 29 EDIT f8=customer.phone, TITLE="Phone", SCROLL;
 30 END
 31 
 32 INSTRUCTIONS
 33 SCREEN RECORD sa_cust(customer.*);
 34 END
Note:
  • Line 1 defines the database schema to be used for this form specification file.
  • Lines 3 thru 14 define the LAYOUT section of the form with a TABLE container.
  • Lines 16 thru 18 declare the use of the customer SQL table definition of the custdemo schema.
  • Lines 20 thru 30 declare form field attributes for the table columns.
  • Lines 32 thru 34 define the form instructions.
  • Line 33 declares the sa_cust screen array, used to group form fields that define the TABLE columns.