Cols.rawVal()
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.
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();
Related events
The following events are only triggered when value is specified, since only then is a value actually written.
| Event | Applies to | Occurs when |
|---|---|---|
| rowpreupdate | Data source objects | Before a record is updated |
| colpreupdate | Data source objects | Before a value in a column is updated |
| colpostupdate | Data source objects | After a value in a record is updated |
| rowpostupdate | Data source objects | After a record is updated |