Progress
Programming
Handbook


Attribute Example

The following code fragment sets an attribute based on the Progress user ID, tests a logical expression that includes the result, and displays a message that includes a value assigned from another attribute.

DEFINE VARIABLE SecurityCode AS INTEGER.
DEFINE VARIABLE LastCodeDisplay AS CHARACTER.
DEFINE FRAME SecurityFrame SecurityCode WITH SIDE-LABELS.
                  .
                  .
                  .
IF USERID ("sports") <> "SUPERVISOR" THEN 
    SecurityCode:VISIBLE = FALSE.

IF NOT SecurityCode:VISIBLE THEN DO:
    LastCodeDisplay = SecurityCode:SCREEN-VALUE.
    MESSAGE "You cannot continue with security code " LastCodeDisplay.
    QUIT.
END. 


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