DIALOG DISPLAY ARRAY p_invoices TO s_invoices.* END DISPLAY DISPLAY ARRAY p_overterms TO s_overterms.* END DISPLAY DISPLAY ARRAY p_associated TO s_associated.* END DISPLAY DISPLAY ARRAY p_openorders TO s_openorders.* END DISPLAY DISPLAY ARRAY p_history TO s_history.* END DISPLAY ON ACTION close EXIT DIALOGEND DIALOG
DIALOG SUBDIALOG invoices SUBDIALOG overterms SUBDIALOG associated SUBDIALOG openorders SUBDIALOG history ON ACTION close EXIST DIALOGEND DIALOG DIALOG invoices() DISPLAY ARRAY p_invoices TO s_invoices.*END DIALOG and so on
It does introduce a new problem in that the tabs trigger the dialog action, so no matter which tab is clicked the program switches to the first tab and the display array in it.
DIALOG ATTRIBUTE (UNBUFFERED) DISPLAY ARRAY p_invoices TO s_invoices.* END DISPLAY DISPLAY ARRAY p_overterms TO s_overterms.* END DISPLAY DISPLAY ARRAY p_associated TO s_associated.* END DISPLAY DISPLAY ARRAY p_openorders TO s_openorders.* END DISPLAY DISPLAY ARRAY p_history TO s_history.* END DISPLAY -- Or on 2.50 use SUBDIALOG for each display array -- SUBDIALOG invoices BEFORE DIALOG -- Assuming you have loaded a first customer -- call a function to display the header details CALL display_customer_header(p_customer.*) ON ACTION next_customer -- Call whatever you use to fetch your customer -- You won't need to pass the arrays unless their scope if local to the function -- Dynamic arrays will automatically be refreshed CALL fetch_next_customer(p_invoices, p_overterms, p_associated, p_openorders, p_history) RETURNING p_customer.* -- Dynamic arrays are passed by reference so do not need returning CALL display_customer_header(p_customer.*) ON ACTION previous_customer -- Same principal as above ON ACTION close EXIT DIALOG ON ACTION yourotheractions END DIALOG