The Customer List Form
The Customer List form displays when the user clicks the button next to the store number
field (the buttonEdit widget). The custlist.per form defines a typical 'zoom'
form with a filter field and record list where the user can pick an element to be used in a field of
the main form. Using this form, the user can scroll through the list to pick a store, or can enter
query criteria to filter the list prior to picking. The fields that make up the columns of the table
that display the list are defined as FORMONLY
fields. When TYPE
is
not defined, the default data type for FORMONLY
fields is
CHAR
.
Form custlist.per:
001
SCHEMA
custdemo
002
003
LAYOUT
004
GRID
005
{
006
<g g1 >
007
Store name: [fc :fe ]
008
< >
009
<t t1 >
010
Id Name City
011
[f01 |f02 |f03 ]
012
[f01 |f02 |f03 ]
013
[f01 |f02 |f03 ]
014
[f01 |f02 |f03 ]
015
< >
016
}
017
END
018
END
019
020
TABLES
021
customer
022
END
023
024
ATTRIBUTES
025
GROUP
g1: TEXT
="Filter";
026
EDIT
fc = customer.store_name;
027
BUTTON
fe: fetch, IMAGE
="filter";
028
EDIT
f01=FORMONLY
.s_num;
029
EDIT
f02=FORMONLY
.s_name;
030
EDIT
f03=FORMONLY
.s_city;
031
END
032
033
INSTRUCTIONS
034
SCREEN RECORD
sa_cust (FORMONLY
.*);
035
END
Note:
- Line
001
defines the database schema to be used by this form. - Lines
003
thru018
define aLAYOUT
section that describes the layout of the form.- Lines
006
thru008
define aGROUPBOX
with thefc
field where the user can enter a search criteria, and thefe
button to trigger the query. - Lines
009
thru015
define aTABLE
that will be used to display the result set of the query.
- Lines
- Lines
020
thru022
define aTABLES
section to reference database schema tables. - Lines
024
thru031
define anATTRIBUTES
section with the details of form fields.- Line
026
defines the query field with a reference to thecustomer.store_name
database column. This will implicitly define the data type of the field and the Query by Example input rules. - Line
027
defines theBUTTON
that will invoke the database query. - Lines
028
thru030
define the columns of the table with theFORMONLY
prefix.
- Line
- Lines
033
thru035
define anINSTRUCTIONS
section to group item fields in a screen array.