PreviousNextIndex

CURRENT-VALUE statement

Resets the current integer value of a sequence defined in the Data Dictionary.

Syntax

CURRENT-VALUE ( sequence [ , logical-dbname ] ) = expression 

sequence
logical-dbname
expression
Example

The following example resets the current value of the NextCustNum sequence to the CustNum value of the last Customer record if that is a valid value for the sequence:

r-curvl1.p
FIND LAST customer NO-LOCK. 
IF Customer.CustNum < CURRENT-VALUE(NextCustNum) AND 
  Customer.CustNum > 1000 THEN DO: 
  CURRENT-VALUE(NextCustNum) = Customer.CustNum. 
  MESSAGE "The value of NextCustNum has been changed to" 
    Customer.CustNum VIEW-AS ALERT-BOX INFORMATION BUTTONS OK. 
END. 
ELSE  
  MESSAGE "The value of NextCustNum remains" 
    CURRENT-VALUE(NextCustNum) VIEW-AS ALERT-BOX INFORMATION BUTTONS OK. 

Notes
See also

CURRENT-VALUE function, DYNAMIC-CURRENT-VALUE function, DYNAMIC-CURRENT-VALUE statement, DYNAMIC-NEXT-VALUE function, NEXT-VALUE function


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex