Consultor Eletrônico



Kbase P98139: How to set the screen value of a filter field in an ADM2 smartFilter
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/13/2006
Status: Unverified

GOAL:

How to set the screen value of a filter field in an ADM2 smartFilter

GOAL:

How to dynamically set the filter values of a smartFilter

FACT(s) (Environment):

Progress 9.1x

FIX:

Get the handles of the enabled fields in the SmartFilter and then set the screen value property. For example the following code is placed in the trigger of a button on a smartDataViewer:


DO:
DEFINE VARIABLE h_SDO AS HANDLE NO-UNDO.
DEFINE VARIABLE h_SF AS HANDLE NO-UNDO.
DEFINE VARIABLE h_field AS HANDLE NO-UNDO.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE cEnableFields AS CHARACTER NO-UNDO.

{get datasource h_SDO}.
{get filtersource h_SF h_SDO}.
{get EnabledHandles cEnableFields h_SF}.

DO i = 1 TO NUM-ENTRIES(cEnableFields):
h_Field = WIDGET-HANDLE(ENTRY(i, cEnableFields)).
IF h_field:NAME = "binNum" THEN LEAVE.
END.

h_field:SCREEN-VALUE = "9".
END.