Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : NOT ENTERED function
 

NOT ENTERED function

Returns a TRUE value if a frame field was not modified during the last INSERT, PROMPT-FOR, SET, or UPDATE statement.
Note: Does not apply to SpeedScript programming.

Syntax

[ FRAME frame ] field NOT ENTERED
FRAME frame
The frame name that contains the field named by the field argument. If you do not name a frame, the NOT ENTERED function starts with the current frame and searches outward until it finds the field you name with the field argument.
field
The name of the field or variable you are checking.

Example

This procedure displays the CustNum, Name, and CreditLimit for each Customer. For each Customer, the procedure prompts the user for a new CreditLimit value. The NOT ENTERED function tests to see if you enter a value. If you enter a value and it is different from the present value of CreditLimit, the procedure displays the old and new CreditLimit values. If you enter the same value or no value, the procedure displays a message that the CreditLimit has not been changed.
r-nenter.p
DEFINE VARIABLE new-max NO-UNDO LIKE Customer.CreditLimit.

FOR EACH Customer:
  DISPLAY Customer.CustNum Customer.Name Customer.CreditLimit
    LABEL "current max credit"
    WITH FRAME a 1 DOWN ROW 1.
  SET new-max LABEL "new max credit"
    WITH SIDE-LABELS NO-BOX ROW 10 FRAME b.
  IF new-max NOT ENTERED OR new-max = Customer.CreditLimit THEN DO:
    DISPLAY "No Change In credit-limit" WITH FRAME d ROW 15.
    NEXT.
  END.
  DISPLAY "Changing Credit Limit of" Customer.Name SKIP
    "from" Customer.CreditLimit "to" new-max WITH FRAME c ROW 15 NO-LABELS.
  Customer.CreditLimit = new-max.
END.

Note

If you use a field or variable referenced with NOT ENTERED in more than one frame, then the AVM uses the value in the frame most recently introduced in the procedure. To make sure you are using the appropriate frame, use the FRAME option with the NOT ENTERED function to reference a particular frame.

See also

ENTERED function