Consultor Eletrônico



Kbase P104446: How to assign an updatable field in a NO-ASSIGN browse widget on the LEAVE event of that field?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/05/2005
Status: Verified

GOAL:

How to assign an updatable field in a NO-ASSIGN browse widget on the LEAVE event of that field?

FIX:

Assume that the Customer table is used to populate the NO-ASSIGN browse widget. Assume further that the Customer.Name field is updatable. Then the following LEAVE event trigger of the Customer.Name field would ASSIGN the value of that field if it has been MODIFIED by the user:
ON LEAVE OF Customer.Name IN BROWSE CustomerBrowse DO:
IF Customer.Name:MODIFIED IN BROWSE CustomerBrowse THEN DO:
FIND CURRENT Customer EXCLUSIVE-LOCK.
ASSIGN
Customer.Name = NAME:SCREEN-VALUE IN BROWSE CustomerBrowse.
END.
END.