ENTERED function
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Checks whether a frame field has been modified during the last INSERT, PROMPT-FOR, SET, or UPDATE statement for that field, and returns a TRUE or FALSE result.
Note: Does
not apply to SpeedScript programming.
Syntax
|
- [ FRAME frame ] field
- The name of the frame field you are checking. If you omit the FRAME option, the field name must be unambiguous.
Example
This
procedure goes through the Customer table and prompts the user for a
new CreditLimit value. The ENTERED function tests
the value the user enters. If the user enters a new value, the procedure displays
the old and new CreditLimit values. If the user enters
the same or no value, the value does not change.
r-enter.p
|
Notes
- If you type blanks in a field where data has never been displayed, the ENTERED function returns FALSE, a SET or ASSIGN statement does not update the underlying field or variable. Also, if the AVM has marked a field as entered, and the PROMPT-FOR statement prompts for the field again and you do not enter any data, the AVM no longer considers the field entered.
- If you have changed the field's window value since the last INSERT, PROMPT-FOR, SET, or UPDATE statement on that field, the ENTERED function returns FALSE. For example, if you use the DISPLAY statement to change the value of the field, ENTERED no longer returns TRUE.
- Before referencing a widget with the ENTERED function, you must scope
the frame that contains that widget. For example, the following
code does not compile:
/* This code does not compile. */ DEFINE FRAME x myint AS INTEGER mychar AS CHARACTER. ON LEAVE OF mychar IF mychar ENTERED THEN MESSAGE "Character value changed.". UPDATE myint mychar WITH FRAME x.The DEFINE FRAME statement does not scope the frame. Therefore, the reference to the ENTERED function in the trigger cannot be evaluated. To fix the problem, reference the frame in a DISPLAY statement before the ON statement.