Kbase P10996: Enabling/Disabling field in a SmartDataBrowse from the leave
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/27/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1x
SYMPTOM(s):
Using SmartObjects
Enabling & Disabling columns in a SmartDataBrowser within LEAVE triggers
CHANGE:
Source code was changed to enable/disable other columns in the SmartDataBrowser during the LEAVE event of some other column in the SmartDataBrowser
CAUSE:
The source code in the LEAVE trigger was causing validation errors to come back from the RowObject.Validate procedure of the SmartDataObject
FIX:
In the LEAVE trigger, disallow the default handling of the event and manually give focus to the required column in the SmartDataBrowser.
For example, if the LEAVE trigger contains the following:
IF SELF:SCREEN-VALUE = "ABC" THEN
ASSIGN SELF:READ-ONLY = TRUE
RowObject.Field2:READ-ONLY IN BROWSE {&BROWSE-NAME} = FALSE
RowObject.Field3:READ-ONLY IN BROWSE {&BROWSE-NAME} = FALSE.
should be changed to:
IF SELF:SCREEN-VALUE = "ABC" THEN
DO:
ASSIGN RowObject.Field2:READ-ONLY IN BROWSE {&BROWSE-NAME} = FALSE
RowObject.Field3:READ-ONLY IN BROWSE {&BROWSE-NAME} = FALSE
SELF:READ-ONLY = TRUE.
APPLY 'ENTRY' TO RowObject.Field2 IN BROWSE {&BROWSE-NAME}.
RETURN NO-APPLY.
END.