Consultor Eletrônico



Kbase P106464: Optional Value for a SmartSelect is shown as blank
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/02/2007
Status: Unverified

SYMPTOM(s):

Optional Value for a SmartSelect is shown as blank

Optional Value is specified for a SmartSelect

Optional Value can be specified when updating the record

CAUSE:

This is a known issue being investigated by Development.

FIX:

A work around is to write a displayFields override with code simplar to the following:
PROCEDURE displayFields :
/*------------------------------------------------------------------------------
Purpose: Super Override
Parameters:
Notes:
------------------------------------------------------------------------------*/
DEFINE INPUT PARAMETER pcColValues AS CHARACTER NO-UNDO.
/* Code placed here will execute PRIOR to standard behavior. */
RUN SUPER( INPUT pcColValues).
DEFINE VARIABLE hContainerHandle AS HANDLE NO-UNDO.
DEFINE VARIABLE hFrameGroupHandle AS HANDLE NO-UNDO.
DEFINE VARIABLE hDisplayedField AS HANDLE NO-UNDO.
DEFINE VARIABLE cScreenValue AS CHARACTER NO-UNDO.
ASSIGN
hContainerHandle = DYNAMIC-FUNCTION('getContainerHandle':U IN h_dynselect)
hFrameGroupHandle = hContainerHandle:FIRST-CHILD
hDisplayedField = hFrameGroupHandle:FIRST-CHILD.
hDisplayedField:ADD-LAST(DYNAMIC-FUNCTION('getOptionalString':U IN h_dynselect), DYNAMIC-FUNCTION('getOptionalString':U IN h_dynselect)).
cScreenValue = hDisplayedField:SCREEN-VALUE.

IF cScreenValue = ? OR TRIM(cScreenValue) = "" THEN DO:
ASSIGN
hDisplayedField:SCREEN-VALUE = DYNAMIC-FUNCTION('getOptionalString':U IN h_dynselect).
hDisplayedField:MODIFIED = TRUE.
END.
/* Code placed here will execute AFTER standard behavior. */
END PROCEDURE.