Use
ON ACTION blocks to execute a sequence of instructions when the user
raises a specific action. This is the preferred solution compared to
ON
KEY blocks, because
ON ACTION blocks use abstract names to
control user
interaction.
ON ACTION zoom
CALL zoom_customers() RETURNING st, cust_id, cust_name
Add the
INFIELD field-spec option to make the runtime system
enable/disable the action automatically when the focus enters/leaves the specified
field:
ON ACTION zoom INFIELD customer_city
LET rec.customer_city = zoom_city()