The Customer List Module
The custlist.4gl module defines a 'zoom' module, to let the user select a customer from a list. The module could be reused for any application that requires the user to select a customer from a list.
This module uses the custlist.per form and is typical list handling using
the DISPLAY ARRAY
statement, as discussed in Chapter 07. The
display_custlist()
function in this module returns the customer id
and the name. See the custlist.4gl source module for more
details.
In the application illustrated in this chapter, the main module orders.4gl
will call the
display_custlist()
function to retrieve a customer
selected by the
user.01
ON ACTION
zoom1
02
CALL
display_custlist() RETURNING
id, name
03
IF
(id > 0) THEN
04
...