Kbase P83029: How to determine the ROW of a BROWSE on the LEAVE event of a COMBO-BOX overlaying one of the browse
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  09/08/2004 |
|
Status: Unverified
GOAL:
How to determine the ROW of a BROWSE on the LEAVE event of a COMBO-BOX overlaying one of the browse fields?
FACT(s) (Environment):
Progress 8.x
FACT(s) (Environment):
Progress 9.x
FACT(s) (Environment):
OpenEdge 10.x
FIX:
1. Define a variable to store the ROWID of the record of interest:
DEFINE VARIABLE rLastRowdEnteredRowId AS ROWID NO-UNDO.
2. In the ENTRY trigger of the COMBO-BOX, loop through the rows of the BROWSE viewport and capture the ROWID of the row that has the same Y coordinate as the COMBO-BOX:
ON ENTRY OF combo1 ANYWHERE
DO:
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO b1:NUM-ITERATIONS:
b1:SELECT-ROW(i).
IF SELF:Y = order-line.backorder:Y IN BROWSE b1 THEN DO:
FIND CURRENT order-line NO-LOCK.
ASSIGN
rLastRowdEnteredRowId = ROWID(order-line).
b1:DESELECT-SELECTED-ROW(1).
LEAVE.
END.
END.
END.
3. When you LEAVE the COMBO-BOX, you have the ROWID or the record of interest to you and you can do with it what you want, for example:
ON LEAVE OF combo1 ANYWHERE
DO:
FIND order-line WHERE ROWID(order-line) = rLastRowdEnteredRowId.
MESSAGE line-num item-num qty price
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.