Informix Error -2026: The FORMONLY field fieldname did not have a type specified. A type must be specified if include lists or default values are specified.
Cause and resolution
The FORMONLY field fieldname did not have a type specified. A type must be specified if include lists or default values are specified.
The usual way of defining a form-only field (one not linked to a database column) is as follows:
tagname = DISPLAYONLY.fieldname TYPE datatype
The TYPE clause is required. Review the attribute statements and recompile the form. (The keyword FORMONLY is used in forms that the 4GL compiler compiles. Its meaning is the same as DISPLAYONLY.)
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2026 fires when a FORMONLY/DISPLAYONLY field (one not linked to a database column) is given
an INCLUDE list or default value without a TYPE clause — per the official guidance, TYPE
is required in that case; FORMONLY is the keyword used in forms the 4GL compiler compiles,
with the same meaning as DISPLAYONLY.
- A
FORMONLY/DISPLAYONLYfield with anINCLUDElist or default value but noTYPEclause, per the official guidance — the direct, only cause.
Solutions / Resolution
- Add the required
TYPEclause, per the official guidance, using the formtagname = DISPLAYONLY.fieldname TYPE datatype. - Review the attribute statements and recompile the form, per the official guidance.
Examples
A FORMONLY field missing TYPE
tagname = FORMONLY.search_status,
INCLUDE = ("pending", "shipped");
-- -2026: no TYPE clause specified
Corrected
tagname = FORMONLY.search_status TYPE CHAR(10),
INCLUDE = ("pending", "shipped");
Diagnostic Checks
- Check every
FORMONLY/DISPLAYONLYfield that has anINCLUDElist or default value, and confirm it also has aTYPEclause.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -2026 in this set yet.
A FORMONLY/DISPLAYONLY field with an INCLUDE list or default value is missing its
required TYPE clause.