Kbase P42750: How to update/assign a disabled SmartDataViewer field? SDV a
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/17/2003 |
|
Status: Unverified
GOAL:
How to update/assign a disabled SmartDataViewer field?
FACT(s) (Environment):
Windows
FACT(s) (Environment):
Progress 9.x
FIX:
The trick is to override the collectChanges procedure in the SDV in order to change the information asked to this procedure by the SDO.
So in this procedure override you can write something like this:
/* collectChanges override */
DEFINE INPUT-OUTPUT PARAMETER pcChanges AS CHARACTER NO-UNDO.
DEFINE INPUT-OUTPUT PARAMETER pcInfo AS CHARACTER NO-UNDO.
/* Code placed here will execute PRIOR to standard behavior. */
RUN SUPER( INPUT-OUTPUT pcChanges, INPUT-OUTPUT pcInfo).
/* Code placed here will execute AFTER standard behavior. */
MESSAGE "Collect changes 2:" SKIP
"pcChanges :" pcChanges skip "pcInfo :" pcInfo
VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* at this moment you have in pcChanges the list of changed field + new values*/
IF (yourConditionToChange) THEN
pcChanges = pcChanges + chr(1) + "disabledField" + chr(1) + myNewValue.
MESSAGE "Collect changes 2:" SKIP
"pcChanges :" pcChanges skip "pcInfo :" pcInfo
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END PROCEDURE.