DTW_TB_SELECT

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

Generates an HTML selection list from a Net.Data table.

Format

@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows, selectedrows, valuecol)

@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows, selectedrows)

@DTW_TB_SELECT(table, name, optioncol, size, multiple, rows)

@DTW_TB_SELECT(table, name, optioncol, size, multiple)

@DTW_TB_SELECT(table, name, optioncol, size)

@DTW_TB_SELECT(table, name, optioncol)

@DTW_TB_SELECT(table, name)

Parameters

Table 156. DTW_TB_SELECT Parameters
Data Type Parameter Use Description
table table IN The macro table variable to display as a SELECT field.
string name IN The value of the NAME attribute of the SELECT field.
integer optioncol IN The column number in table with values to use in the OPTION tags of the SELECT field. The default is to use the first column.
integer size IN The number of rows in table to use for OPTION tags in the SELECT field. The default is to use all the rows.
string multiple IN Specifies whether multiple selections are allowed. The default is N, which does not allow multiple selections.
string rows
IN The row numbers from table to use in the SELECT field. The default is to use all the rows.
string selectedrows
IN The list of rows from table whose OPTION tags are checked. To specify more than one row, you must have the multiple parameter set to Y. The default is to select the first item.
string valuecol IN The column number in table to use for the VALUE attribute of the OPTION tags. The default value is 1. This parameter is optional.

Return Codes

Table 157. DTW_TB_SELECT Return Codes
Return Code Explanation
-1001 The server could not process a Net.Data request to allocate memory.
1001 An input parameter contained a NULL value.
1003 An incorrect number of parameters were passed on a function call.
1004 A parameter passed on a function call, required to be a Net.Data macro table variable, was of a different variable type.
1005 A parameter passed on a function call, required to be a string variable, was of a different variable type.
1007 A parameter contains a value which is not valid.
1008 A parameter is outside of table bounds.

Examples

Example 1: Generates an HTML SELECT menu with multiple selections

@DTW_TB_SELECT(Mytable,"URL6","4","","y","1 2 4","1 4")

Results:

<select name="url6" size="3" multiple>
<option selected>image1text
<option>image2text
<option selected>image4text
</select>

Example 2: Uses the valuecol parameter to generate an HTML SELECT menu that uses a column number from which to obtain the values.

@DTW_TB_SELECT(Mytable,"URL6","4","","y","1 2 4","1 4", "2")

Results:

<select name="url6" size="3" multiple>
<option value="text_string1" selected>image1text</option>
<option value="text_string2">image2text</option>
<option value="text_string4" selected>image4text</option>
</select>


[ Top of Page | Previous Page | Next Page | Index ]