Kbase 20596: How to Change Column Value of Smart Browser
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
How to programmatically change the value of a particular field in a SmartBrowser
GOAL:
How to assign the value of a field in a SmartBrowser
FACT(s) (Environment):
Progress 9.x
FIX:
If you are changing the value of a desired field in a trigger for that field with the following code:
DO:
SELF:SCREEN-VALUE IN BROWSE {&BROWSE-NAME} = "xxx".
END.
The code alone does not work. The code changes the value of the field to 'xxx', but as soon as you leave the field, the field reverts to it's original value. You must tell the ADM that the data has been changed so that the data is picked up in CollectChanges, which is indirectly fired on ROW-LEAVE. To accomplish this, use setDataModified method with the parameter TRUE as follows:
DO:
SELF:SCREEN-VALUE IN BROWSE {&BROWSE-NAME} = "xxx".
DYNAMIC-FUNCTION('setDataModified':U, INPUT TRUE).
END.
This forces the field to retain and permanently save it's new value, even after you leave the row.