Function order_validate
This function validates the entries in the fields of the orders
        screen record.
Function order_validate (orders.4gl):
01 FUNCTION order_validate(d)
02   DEFINE d ui.Dialog 
03   IF NOT d.getFieldTouched("orders.*") THEN
04      RETURN TRUE
05   END IF
06   IF d.validate("orders.*") < 0 THEN
07      RETURN FALSE
08   END IF
09   IF NOT order_check_store_num() THEN
10      RETURN FALSE
11   END IF
12   RETURN TRUE
13 END FUNCTION
Note: 
- Line 
01The dialog object is passed to this function, allowing the use of methods of theDIALOGclass. - Lines 
03thru05returnTRUEto the calling function if the fields in the orders record have not been touched. - Lines 
06thru08call thevalidate()method of the dialog object to execute anyNOT NULL,REQUIRED, andINCLUDEvalidation rules defined in the form specification file for the fields in theordersscreen record. If this validation fails,FALSEis returned to the calling function. - Lines 
09thru11call theorder_check_store_numfunction to verify that thestore_numvalue exists in thecustomerdatabase table. If this validation fails,FALSEis returned to the calling function. - Line 
12returnsTRUEto the calling function when the validation is successful.