Working with Multiple Selection Browsers

CraigS

New Member
Hi guys

I am trying to create a multiple selection browser for the first time (with 8.3B in a Windows environment). I have no issues being able to select multiple records in my browser... but how do I access the sub-set of records?

What I really want is when a user hits OK on a child browse screen, to pass back a comma separated list of key values (from the selected records) to work with in the parent screen.

Cheers

Craig Stephenson
IT Business Support
Capilano Honey Limited
Queensland Australia
c.stephenson@capilano.com.au
 
Assuming that you have an OUTPUT parameter to hold the selected values, you can do something like this:

DEF VAR iRow AS IN NO-UNDO.

DO iRow = 1 TO BROWSE {&BROWSE-NAME}:NUM-SELECTED-ROWS():

IF BROWSE {&BROWSE-NAME}:FETCH-SELECTED-ROW(iRow) THEN
ASSIGN opReturn = opReturn + <table.field> + ",".

END.

The FETCH-SELECTED-ROW() method will retrieve the record for you so that you can place the key value into a string.
 
Top