Adobe ColdFusion 8

getField

Description

Returns the element in the specified row/column position.

Syntax

object.getField( row, col )

Parameters

Parameter

Description

object

Instance name of the WddxRecordset object

row

Integer; zero-based row number of the value to return

col

Integer or string; column of the value to be returned.

Return value

Returns the value in the specified row/column position.

Usage

Call this function to access a value in a WDDX record set.

Example

This example calls the getField function (the variable r is a reference to a WddxRecordset instance):

for (row = 0; row < nRows; ++row)
{
    o += "<tr>";
    for (i = 0; i < colNames.length; ++i)
    {
        o += "<td>" + r.getField(row, colNames[i]) + "</td>";
    }
    o += "</tr>";
}