Kbase P96326: How to process multiple selected rows in a SmartDataBrowse
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/17/2004 |
|
Status: Unverified
GOAL:
How to retrieve data from multiple selected rows in a SmartDataBrowser ?
FIX:
The SmartDataBrowser being a visual object needs to go back to the SmartDataObject to retrieve the data. This is done by getting the SmartDataBrowser to fetch the selected record into the SDO's buffer and then requesting the desired columns to be returned from the SDO.
The following is an example using the state table from the sports2000 database.
DEFINE VARIABLE iRow AS INT NO-UNDO.
DEFINE VARIABLE hSDO AS HANDLE NO-UNDO.
hSDO = DYNAMIC-FUNCTION('getDataSource').
DO iRow = 1 TO BROWSE {&BROWSE-NAME}:NUM-SELECTED-ROWS:
BROWSE {&BROWSE-NAME}:FETCH-SELECTED-ROW(i).
MESSAGE "The " iRow " Selected state is " DYNAMIC-FUNCTION("ColumnValue" IN hSDO, "State").
END.