Skip to main content
Version: 11.2

Rows.keys()

note

This article is about the keys() function of the Rows object.

Rows.keys()

Gets the key columns and values of the first record in the Rows object.

Returns a Map object, where each entry maps a key column alias to its current value.

Syntax

$.udb( *ds* ).rows( [rowRef1], [rowRef2] ).keys()
$.udb( *ds* ).rowSet( *rowSet* ).rows( [rowRef1], [rowRef2] ).keys()

The required ds parameter is a data source selector.

The optional rowSet parameter is a rowset identifier. If the .rowSet() clause is omitted, then .rowSet('current') is assumed.

The optional rowRef1, rowRef2 are row selectors. If omitted, all records in scope are addressed.

Example

$.udb('EMP').rows('current').keys().forEach((value, alias) => {
console.log('%s = %s', alias, value);
});