Consultor Eletrônico



Kbase P84553: 2.1A02 Lookups not blank on a child viewer with no child record, fixed in 2.1A03
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/14/2004
Status: Unverified

FACT(s) (Environment):

Dynamics 2.1A

SYMPTOM(s):

Lookups not blank

Lookup displays value of previous record

A child viewer has no record to display

Dynamics 2.1A02

CAUSE:

Known issue fixed in 2.1A03
If you have a groupassign linked viewer with lookups and you navigate through the parent records of the viewer until you come to a parent record that has no child records, then the lookup can display the value of the previous child record instead of blank.

CAUSE:

Bug# 20031203-032 fixed in 2.1A03

FIX:

Apply SP3 to 2.1A when it is released. In the meantime, the following work around solved the problem (tested in 2.1A02):
Implement the following pseudo code in displayFields of viewercustom.p (or a super proc of one single affected viewer):
after RUN SUPER, do:

If pcColValues = ? /*no record to display*/ then do:
get allFieldHandles
Go through all these handles
if oneHandle:TYPE = "PROCEDURE"
/*known trick to detect if lookup, see issue 20031216-002 on Posse*/
then if {fnarg Signature 'initializeLookup':U h} NE ''
then do:
{get lookupHandle hWidgetHandle hField}. /*handle of the lookup's fill-in*/

/* If multiple fields in cLinkedField, then handle them in a loop... */
{get viewerLinkedWidgets cLinkedField hField}. /* name(s) of linked widget(s) */

/* In viewercustom.p 'hsdv' is TARGET-PROCEDURE, so no need to specify it */
hLinkedField = {fnarg widgetHandle cLinkedField hsdv}. /*now handle of linked widget*/

ASSIGN
hWidgetHandle:SCREEN-VALUE = ''
hLinkedField:SCREEN-VALUE = ''.
END.
end.