RecordSet.setField( ) Method | Flash 6 |
sets a field within a record |
The index number of the recordset row that contains the field to be replaced.
The field name of the field that you want to replace the contents of.
The value that you are setting the field to.
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( ).
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;
RecordSet.replaceItemAt( )