Progress
Language Reference


ENTERED Function

Interfaces
OS
SpeedScript
All
All
No

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.

SYNTAX

[ FRAME frame ] field ENTERED 

[ 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 credit-limit value. The ENTERED function tests the value the user enters. If the user enters a new value, the procedure displays the old and new credit-limit values. If the user enters the same or no value, the value does not change.

r-enter.p
DEFINE VARIABLE new-max LIKE credit-limit.

FOR EACH customer:
    DISPLAY cust-num name credit-limit LABEL "Current credit limit"
          WITH FRAME a 1 DOWN ROW 1.
    SET new-max LABEL "New credit limit"
          WITH SIDE-LABELS NO-BOX ROW 10 FRAME b.
    IF new-max ENTERED THEN DO:
       IF new-max <> credit-limit THEN DO:
           DISPLAY "Changing Credit Limit of" name SKIP
                   "from" credit-limit "to"
                   new-max WITH FRAME c ROW 15 NO-LABELS.
          credit-limit = new-max.
          NEXT.
       END.
    END.
    DISPLAY "No Change In Credit Limit" WITH FRAME d ROW 15.
END. 

NOTES

SEE ALSO

NOT ENTERED Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095