Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : FRAME-VALUE statement
 

FRAME-VALUE statement

Stores the value of an expression in a frame field during a data entry statement.
Note: Does not apply to SpeedScript programming.

Syntax

FRAME-VALUE = expression
expression
A constant, field name, variable name or expression whose value you want to store in a frame field. If no frame is active when the AVM runs this statement, the AVM returns an error message. Otherwise, if the frame is in view, the AVM redisplays the field.
The data type of the expression must be the same as the data type of the frame field in which you are storing that expression. However, if the data type of expression is character, the AVM stores characters in the frame field regardless of the data type of that frame field, truncating characters if necessary.
The FRAME-VALUE statement can pass information from an applhelp.p procedure to the calling procedure. For example, if the user enters a value into a field called help-field, you can pass that value back to the calling procedure with this statement:
FRAME-VALUE = INPUT help-field.

Example

This procedure displays the word PROGRESS, the date, and a message instructing you to enter data or press the GET key to enter the Unknown value (?). You can update the information in the frame. If you press GET, the r-frmval.p procedure assigns the Unknown value (?) to a field with the FRAME-VALUE statement.
r-frmval.p
DEFINE VARIABLE txt     AS CHARACTER NO-UNDO INITIAL "PROGRESS".
DEFINE VARIABLE tmpdate AS DATE      NO-UNDO INITIAL TODAY.

IF KBLABEL("GET") = "GET" THEN ON F3 GET.

STATUS INPUT "Enter data or use the " + KBLABEL("GET")
  + " key to enter the Unknown value (?)".

UPDATE txt tmpdate EDITING:
  READKEY.
  IF KEYFUNCTION(LASTKEY) = "GET" THEN DO:
    FRAME-VALUE = ?.
    NEXT.
  END.
  APPLY LASTKEY.
END.

Note

For more information on frames, see OpenEdge Getting Started: ABL Essentials.

See also

FRAME-FIELD function, FRAME-FILE function, FRAME-VALUE function