Form example: custlistinp.per
The custlistinp.per form specification file contains a
TABLE
container and screen array used to display a list of
customer
rows.
The custlistinp.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
thru14
define theLAYOUT
section of the form with aTABLE
container. - Lines
16
thru18
declare the use of thecustomer
SQL table definition of thecustdemo
schema. - Lines
20
thru30
declare form field attributes for the table columns. - Lines
32
thru34
define the form instructions. - Line
33
declares thesa_cust
screen array, used to group form fields that define theTABLE
columns.