Kbase P114131: How to echo a running total of an updatable INTEGER field of a SmartDataBrowse in a FILL-IN widget o
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  09/03/2006 |
|
Status: Unverified
GOAL:
How to echo a running total of an updatable INTEGER field of a SmartDataBrowse in a FILL-IN widget of the parent SmartWindow?
FIX:
The following steps demonstrate how to echo a running total of the values input by the user in the Qty field of an updatable SmartDataBrowse. It is assumed that all initial values are zero and that the user will not input values into the same cell more than once:
1. In the SmartDataBrowse define the following variable in the definitions section:
DEFINE VARIABLE iRunningTotal AS INTEGER NO-UNDO.
2. In the SmartDataBrowse, create a LEAVE trigger for the rowObject.Qty:
DO:
ASSIGN
iRunningTotal = iRunningTotal + INTEGER(SELF:SCREEN-VALUE).
PUBLISH "UpdateRunningTotal" (INPUT iRunningTotal).
END.
3. In the SmartWindow put the following statement after RUN SUPER of an initializeObject procedure override.
SUBSCRIBE TO "UpdateRunningTotal" IN h_bmyorderline.
4. In the SmartWindow, create an UpdateRunningTotal procedure:
DEFINE INPUT PARAMETER ipRunningTotal AS INTEGER.
FILL-IN-1:SCREEN-VALUE IN FRAME fMain = STRING(ipRunningTotal).