getFirstValueForKey

Object dataSet.getFirstValueForKey (String key )

Description

Get the first non-null value, in a data set, for a given token.

Parameters

  • key Name of the column whose value is returned, as a string.

Return Values

Returns the first non-null value in the column, usually a string (unless records have been manually added). If none is found, null is returned.

Change Log

Version Description
5.0 Added for all editions.

Examples

Get First Non-null Token Value

 // Gets the value of the first "CITY_CODE" in the
 // data set.

 fieldValue = dataSet.getFirstValueForKey("CITY_CODE");

See Also

  • get() [dataSet] - Get a single piece of data held by a DataRecord in the DataSet.
  • findValue() [dataSet] - Retrieve a field's value in a data set based on another field.