put

Object dataRecord.put ( Object key, Object value )

Description

Add a new field to the DataRecord or update the value of an existing field.

Parameters

  • key The name of the associative key, usually a string but, if you have manually added fields, it can be an integer, etc.
  • value The new value to be associated with the key.

Return Values

Returns the value previously associated with the specified key. If the key did not exist then it will return null.

Change Log

Version Description
4.5 Available for all editions.

Examples

Add/Change DataRecord Field

 // Adds a field called "CITY" with
 // the value "Los Angeles".

 dataRecord.put( "CITY", "Los Angeles" );

See additional example usage: Iterate over DataSets & DataRecords.