GET_FLDBUF()
The GET_FLDBUF() operator returns as
character strings the current values of the specified fields.
Syntax
GET_FLDBUF ( [group.]field [,...] )
- group can be a table name, a screen record, a screen array or
FORMONLY. - field is the name of the screen field.
Usage
The GET_FLDBUF() operator is used to get the value of a screen field before the
input buffer is copied into the associated variable.
INPUT, INPUT ARRAY,
CONSTRUCT). The behavior is undefined when used in
DISPLAY ARRAY.The GET_FLDBUF() operator takes the field names as identifiers, not
as string expressions:
LET v = GET_FLDBUF( customer.custname )If multiple fields are specified between parentheses, use the RETURNING
clause:
CALL GET_FLDBUF( customer.* ) RETURNING rec_customer.*When used in a INPUT ARRAY instruction, the runtime system assumes
that you are referring to the current row.
The values returned by this operator are context dependent; it must be used carefully. If possible, use the variable associated to the input field instead.
When using the UNBUFFERED mode, program variables are automatically assigned,
and the GET_FLDBUF operator is not required in most cases.
Example
INPUT BY NAME ...
...
ON KEY(CONTROL-Z)
LET v = GET_FLDBUF( customer.custname )
IF check_synonyms(v) THEN
...