Consultor Eletrônico



Kbase P35586: How to update some fields of the SDV when the UPDATE button
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/9/2003
Status: Unverified

GOAL:

How to programmatically update some fields of the Smart Data Viewer when the UPDATE button of the linked smart panel is chosen.

GOAL:

How to programmatically preset a value in a SDV when pressing update

FIX:

Probably you'd like that some fields of the SDV are changed programmatically when the UPDATE button of a smart panel is chosen. This could be particularly useful when you want to update a field containing the date of the last update.
As ProSpy shows the procedure of the viewer that is called when choosing the UPDATE button of the smart panel is called enableFields.
So, you have to edit the viewer and enter an override of this procedure:


/* Code placed here will execute PRIOR to standard behavior. */

rowobject.DateUpdated:SCREEN-VALUE IN FRAME {&FRAME-NAME} = TODAY.
/* DateUpdated is the field you want to update*/

RUN SUPER.

/* Code placed here will execute AFTER standard behavior. */

END PROCEDURE.