Kbase P18422: How to catch the value change of a cell in a browse.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/03/2003 |
|
Status: Unverified
GOAL:
How to catch the value change of a cell in a browse.
FIX:
First of all the browse has to defined as NO-ASSIGN, the ASSIGN has to be committed manually.
Here is a sample working against sports2000 database:
DEFINE QUERY myQuery FOR customer.
DEFINE BROWSE myBrowse QUERY myQuery SHARE-LOCK DISPLAY state name
ENABLE customer.state
WITH no-box 10 down
separators
SIZE 50 by 6.5 NO-ASSIGN.
OPEN QUERY myQuery FOR EACH customer.
ENABLE myBrowse WITH FRAME fr.
ON ROW-LEAVE OF myBrowse IN FRAME fr DO:
FIND CURRENT customer.
IF (customer.state <> customer.state:SCREEN-VALUE IN BROWSE mybrowse) THEN DO:
ASSIGN customer.state.
MESSAGE "The cell value has been changed"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
END.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.