Form example: custlist.per
The custlist.per form specification file contains a
TABLE container and screen array used to display a list of
customer rows.
Form custlist.per:
1 SCHEMA custdemo
2
3 LAYOUT (TEXT="Customer list")
4 VBOX
5 TABLE
6 {
7 Id Name City St Zipcode
8 [f1 |f2 |f3 |f4 |f5 ]
9 [f1 |f2 |f3 |f4 |f5 ]
10 [f1 |f2 |f3 |f4 |f5 ]
11 [f1 |f2 |f3 |f4 |f5 ]
12 [f1 |f2 |f3 |f4 |f5 ]
13 }
14 END
15 GRID
16 {
17 Address: [f6 ]
18 [ ]
19 Contact: [f7 ]
20 Phone: [f8 ]
21 }
22 END
23 END
24 END
25
26 TABLES
27 customer
28 END
29
30 ATTRIBUTES
31 EDIT f1=customer.cust_num;
32 EDIT f2=customer.cust_name;
33 PHANTOM customer.addr;
34 EDIT f3=customer.city;
35 EDIT f4=customer.state;
36 EDIT f5=customer.zipcode;
37 PHANTOM customer.contact_name;
38 PHANTOM customer.phone;
39 TEXTEDIT f6=FORMONLY.cr_addr, STRETCH=BOTH;
40 EDIT f7=FORMONLY.cr_contact_name;
41 EDIT f8=FORMONLY.cr_phone;
42 END
43
44 INSTRUCTIONS
45 SCREEN RECORD sa_cust(customer.*);
46 ENDNote:
- Line
1declares that thecustdemoschema will be used by the compiler to determine the data types of the form fields. - Line
4defines aVBOXvertical box that contains aTABLEand aGRIDcontainer. - Lines
5thru14define theTABLEcontainer to hold the list of customer record. - Lines
15thru22define theGRIDcontainer that groups additional fields. - Lines
30thru42: TheATTRIBUTESsection contains form field definitions linked to item tags in theLAYOUTsection. - Lines
31thru38define the form fields of the customer record list controller by the programDISPLAY ARRAY. - Lines
39thru41define form fields of theGRIDcontainer, that will be displayed individually by the program code. - Line
45defines the screen array in theINSTRUCTIONSsection. The screen record elements must match the column list in theTABLEcontainer. This example defines the screen record with all fields defined with thecustomerprefix.PHANTOMfields will be part of the data set, but are not displayed in theTABLEcontainer.