Function order_query

This function allows the user to enter query criteria for the orders table. It calls the function order_select to retrieve the rows from the database table.

Function order_query (orders.4gl):
01 FUNCTION order_query()
02   DEFINE where_clause STRING,
03         id INTEGER, name STRING
04 
05   MESSAGE msg02
06 
07   LET int_flag = FALSE
08   CONSTRUCT BY NAME where_clause ON
09       orders.store_num, 
10       customer.store_name, 
11       orders.order_num, 
12       orders.order_date, 
13       orders.fac_code 
14 
15     ON ACTION zoom1
16        CALL display_custlist() RETURNING id, name 
17        IF id > 0 THEN
18           DISPLAY id TO orders.store_num 
19           DISPLAY name TO customer.store_name 
20        END IF
21 
22   END CONSTRUCT
23 
24   IF (int_flag) THEN
25      LET int_flag=FALSE
26      CLEAR FORM
27      MESSAGE msg03
28      RETURN FALSE
29   END IF
30   
31   RETURN order_select(where_clause)
32 
33 END FUNCTION
Note: