Skip to main content
Version: 11.2

Cols.rawVal()

note

This article is about the rawVal() function of the Cols object.

Cols.rawVal()

Gets or sets the raw value of the first column in scope, i.e. the value with no IO format applied.

tip

To get or set the value with its IO format applied, use .val() instead.

Returns the raw value of the first column in scope if value is omitted. Returns the UdbCols object if value is specified.

Syntax

$.udb( *ds* ).rows( *rowRef1*, [rowRef2] ).cols( [columns] ).rawVal( [value], [options] )
$.udb( *ds* ).rowSet( *rowSet* ).rows( *rowRef1*, [rowRef2] ).cols( [columns] ).rawVal( [value], [options] )

$.udb( *ds* ).searchCols( [columns] ).rawVal( [value], [options] )

*options* ::= {
[lookupRef]: *lookup-ref*,
[quiet]: *quiet*
}

*quiet* ::= { true | [false] }

The required ds parameter is a data source selector.

The optional columns is a column selector. If omitted, all columns in scope are selected.

The optional value is the new raw value that the first column in scope is set to.

The optional lookup-ref is an object used to specify additional information about the value, in the situation where an autocompletion control is used, and the value refers to a column in its associated data source.

The optional quiet is a boolean that determines whether the new value is immediately propagated to all controls that may show it. The default is false, which means it is shown immediately.

Example

let realVal = $.udb('EMP').rows('current').cols('POSTAL_CODE').rawVal();

The following events are only triggered when value is specified, since only then is a value actually written.

EventApplies toOccurs when
rowpreupdateData source objectsBefore a record is updated
colpreupdateData source objectsBefore a value in a column is updated
colpostupdateData source objectsAfter a value in a record is updated
rowpostupdateData source objectsAfter a record is updated