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
as defined in the form. - field is the name of the field as defined in the form.
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.
Without group prefix, the operator will use a matching field name, by ignoring
the prefix used in the form file or in the FROM
clause of the dialog
instruction.
FORMONLY
keyword as defined in the form file. The group
prefix to be specified depends on the type of variable-to-field binding used by the dialog instruction:- When using the
BY NAME
clause as inINPUT var-list BY NAME
orCONTRUCT BY NAME sql-cond ON column-list
, the field prefix is ignored, only the filed name must match. - When using the
FROM
clause as inINPUT var-list FROM field-list
,CONTRUCT sql-cond ON column-list FROM field-list
orINPUT ARRAY arr-name FROM scr-array.*
, the field prefix must match the table name, screen record or screen array used in theFROM
clause.
Example
INPUT BY NAME ...
...
ON KEY(CONTROL-Z)
LET v = GET_FLDBUF( customer.custname )
IF check_synonyms(v) THEN
...