Previous Next

NEXT-PROMPT statement
Specifies the field in which you want to position the cursor during the next input operation that involves that field in a frame.
Note:
Syntax 
 
NEXT-PROMPT field [ frame-phrase ]
field
Indicates the name of the input field in which you want to place the cursor the next time the user supplies input to the frame. If the field you name is not an input field in the frame, the AVM disregards the NEXT-PROMPT statement.
frame-phrase
Specifies the overall layout and processing properties of a frame. For more information on frame-phrase, see theFrame phrase reference entry.
Example 
This procedure lets you update Customer information. If you do not enter a value for Customer.Contact, the AVM positions the cursor in the Contact field when the UPDATE statement is processed following the UNDO, RETRY of the FOR EACH block.
 
FOR EACH Customer:
  UPDATE Customer WITH 2 COLUMNS.
  IF Customer.Contact EQ " " THEN DO:
    MESSAGE "You must enter a contact".
    NEXT-PROMPT Customer.Contact.
    UNDO, RETRY.
  END.
END.
Notes 
*
*
*
*
 
DEFINE VARIABLE a AS CHARACTER NO-UNDO.
DEFINE VARIABLE b AS CHARACTER NO-UNDO.
 
UPDATE a b.
However, if you include NEXT-PROMPT b before the update statement, as shown in the following procedure, the AVM prompts for b first and a second:
 
DEFINE VARIABLE a AS CHARACTER NO-UNDO.
DEFINE VARIABLE b AS CHARACTER NO-UNDO.
 
NEXT-PROMPT b.
UPDATE a b.
See also 
EDITING phrase, Frame phrase

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.