Consultor Eletrônico



Kbase P55530: How to synchronize to 2 lookups defined against the same tab
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/11/2003
Status: Unverified

GOAL:

How to synchronize to 2 lookups defined against the same table, in order to provide 2 different fields to search on (lookup targets being free simple fill-in's)

FIX:

Solution reported to work fine, but had no time to test it. Anyway, the idea is to Handle the situation in lookupComplete of the SDV.

Everything is coded in SDV super procedure:

In initializeObject
1) You need to to subscribe SDV super proc to lookupComplete in target-proc with the following (will be published by the dyn SDV):
SUBSCRIBE PROCEDURE TARGET-PROCEDURE TO "lookupComplete" IN TARGET-PROCEDURE.

In lookupComplete
2.a) , first unsubscribe to lookupComplete to avoid a infinite loop,

2.b) then handle the situation to synchronize the lookups with getDataValue and setDataValue in hLookupA and hLookupB.

2.c) and finally resubscribe to the event:
SUBSCRIBE PROCEDURE TARGET-PROCEDURE TO "lookupComplete" IN TARGET-PROCEDURE.