Adobe ColdFusion 8

setField

Description

Sets the element in the specified row/column position.

Syntax

object.setField( row, col, value )

Parameters

Parameter

Description

object

Instance name of a WddxRecordset object

row

Integer; row that contains the element to set

col

Integer or string; the column containing the element to set

value

Value to set

Return value

None.

Usage

Call this function to set a value in a WddxRecordset instance.

Example

This example calls the setField function:

// Create a new recordset
rs = new WddxRecordset();

// Add a new column
rs.addColumn("NewColumn");

// Extend the record set by 3 rows
rs.addRows(3);

// Set an element in the first row
// newValue is a previously defined variable
rs.setField(0, "NewColumn", newValue);