The INFIELD() operator checks for the current screen field.


INFIELD ( [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.


INFIELD() checks for the current field in a CONSTRUCT, INPUT or INPUT ARRAY dialog.

When used in an INPUT ARRAY instruction, the runtime system assumes that you are referring to the current row.

For a generic equivalent, use the DIALOG.getCurrentItem() method.

When using INFIELD(field) without group prefix, the operator will check if the current field name matches, by ignoring the prefix used in the form file or in the FROM clause of the dialog instruction.

When using INFIELD(group.field), the group prefix must be a table name, screen record, screen array or the FORMONLY keyword as defined in the form, and its usage depends on the type of variable-to-field binding used by the dialog instruction:


  ON ACTION check
     IF INFIELD( custname ) THEN
        CALL check_customer_name( rec.custname )