GET_FLDBUF()

The GET_FLDBUF() operator returns as character strings the current values of the specified fields.

Syntax

GET_FLDBUF ( [group.]field  [,...] )
  1. group can be a table name, a screen record, a screen array or FORMONLY as defined in the form.
  2. 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.

Note: Use of this operator is recommended only in dialogs allowing field input (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.

When used, the group prefix is a table name, screen record, screen array or the 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:

Example

INPUT BY NAME ...
   ...
   ON KEY(CONTROL-Z)
      LET v = GET_FLDBUF( customer.custname )
      IF check_synonyms(v) THEN
         ...