Name
RecordSet.setField( ) Method
Synopsis
myRecordSet
.setField(index
,fieldName
,value
)
Arguments
-
index
The index number of the recordset row that contains the field to be replaced.
-
fieldName
The field name of the field that you want to replace the contents of.
-
value
The value that you are setting the field to.
Description
The setField( ) method replaces the contents of a single field within a row, with no effect on the other fields, allowing for finer control over updating than replaceItemAt( ).
Example
The following code creates a recordset and then replaces the email address in the first record:
#include "RecordSet.as" var myRecordset_rs = new RecordSet(["First", "Last", "Email"]); myRecordset_rs.addItem({First:"Tom", Last:"Muck", Email:"tom@tom-muck.com"}); var email = 'jacksplat@tom-muck.com'; myRecordset_rs.setField(0,"Email", email); trace (myRecordset_rs.getItemAt(0).Email;
See Also
RecordSet.replaceItemAt( )
Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.