Consultor Eletrônico



Kbase P85897: How to get the smartselect browse to initialize its row selection according to user input in the sma
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/08/2004
Status: Unverified

GOAL:

How to get the smartselect browse to initialize its row selection according to user input in the smartviewer's smartselect field instead of the browse search field?

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress 9.1D

FIX:

The following solution assumed that the working directory is named C:\WRK.

1. Create a the subdirectory C:\WRK\adm2.
2. Copy dynselect.w from DLC\src\adm2 to C:\WRK\adm2.
3. Add C:\WRK\adm2 to the PROPATH.
4. Right click on the smartviewer and select 'Edit Master'.
5. Right click on the smartselect and select 'Edit Master'
6. Create the following Override for the dynselect.w browseHandler. /*------------------------------------------------------------------------------
Procedure: browseHandler Override
Purpose: Super Override
Parameters: None
Notes: This browseHandler procedure override makes the browse automatically
select the initial row based on what the user inputs in the viewer's
smartSelect field instead of the Browse's Search Field.
------------------------------------------------------------------------------*/

DEFINE INPUT PARAMETER phBrowseObject AS HANDLE NO-UNDO.

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

RUN SUPER( INPUT phBrowseObject).

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

DEFINE VARIABLE hSource AS HANDLE NO-UNDO.
DEFINE VARIABLE cSearchField AS CHARACTER NO-UNDO.

ASSIGN
hSource = DYNAMIC-FUNCTION('getDataSource':U)
cSearchField = DYNAMIC-FUNCTION('getSearchField':U IN phBrowseObject).

DYNAMIC-FUNCTION('findRowWhere':U IN hSource, cSearchField, DYNAMIC-FUNCTION('getSavedScreenValue':U), '>=':U).

END PROCEDURE.