Progress
Language Reference


FRAME-VALUE Statement

Interfaces
OS
SpeedScript
All
All
No

Stores the value of an expression in a frame field during a data entry statement.

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 Progress runs this statement, Progress returns an error message. Otherwise, if the frame is in view, Progress 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, Progress 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 INITIAL "PROGRESS".
DEFINE VARIABLE tmpdate AS DATE 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 the Progress Programming Handbook .

SEE ALSO

FRAME-FIELD Function, FRAME-FILE Function, FRAME-VALUE Function


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