Form example: stocklist.per
The stocklist.per form specification file contains a
TABLE
container and screen array used to display a list of stock
rows.
The stocklist.per form file:
1 SCHEMA custdemo
2
3 LAYOUT (TEXT="Stock",WINDOWSTYLE="dialog")
4 TABLE
5 {
6 [f1 |f2 ]
7 [f1 |f2 ]
8 [f1 |f2 ]
9 [f1 |f2 ]
10 }
11 END
12 END
13
14 TABLES
15 stock
16 END
17
18 ATTRIBUTES
19 EDIT f1 = stock.stock_num, TITLE="Id";
20 EDIT f2 = stock.description, TITLE="Description";
21 END
22
23 INSTRUCTIONS
24 SCREEN RECORD sa_stock(stock.*);
25 END
Note:
- Line
1
defines the database schema to be used for this form specification file. - Lines
3
thru12
define theLAYOUT
section of the form with aTABLE
container. - Lines
3
defines theLAYOUT
block with aWINDOWSTYLE
attribute set to"dialog"
: This points to the style attribute defined in the FGLDIR/lib/default.4st file, to get a modal window. - Lines
14
thru15
declare the use of thestock
SQL table definition of thecustdemo
schema. - Lines
18
thru21
declare form field attributes for the table columns. - Lines
23
thru25
define the form instructions. - Line
24
declares thesa_stock
screen array, used to group form fields that define theTABLE
columns.