Demonstrate Net.data built-in reporting functions

DTW_TB_CHECKBOX

This built-in function relies on the data in a Net.data %TABLE variable which are closely related to SQL result sets.
The Net.Data %TABLE variable used in this example is generated by populating it from the result of an SQL SQLECT statement.
Click here to show an explanation of this mechanism.

The DTW_TB_CHECKBOX function renders a Net.data %TABLE variable as set of HTML checkboxes.

The complete source for this example can be viewed at dtw_tb_checkbox.

This example first runs a DTW_SQL function named @list() which selects records from the file QIWS/QCUSTCDT.
Function @list() does nothing other than return a %TABLE variable named mytable.
The built-in function DTW_TB_CHECKBOX is then passed %TABLE mytable.
So there are just 2 lines within the %HTML block as follows -

@list(mytable)                                        
@dtw_tb_input_checkbox(mytable,"2","custno","1")
This generates the HTML for checkboxes based on columns 1 and 2 of the file QIWS/QCUSTCDT.
The 2rd and 4th parameters determine the columns for checkbox text and value respectively .
When requested as a Net.data page the response should be -
Johnson
Stevens
Doe
Lee

Back to Tutorial