Kbase P63150: Dynamic Combo and Lookup SetBaseQueryString API works differ
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  19/01/2004 |
|
Status: Unverified
FACT(s) (Environment):
Dynamics 2.1A
SYMPTOM(s):
Dynamic Combo and Dynamic Lookup SetBaseQueryString API does not work in the same way.
SetBaseQueryString does not work for Dynamic Combos but works fine for Dynamic Lookups.
Dynamic Combos ignore changes to SetBaseQueryString.
The base query string of a Dynamic Combo cannot be changed.
CAUSE:
There is a difference between dynamic Lookup Objects and Dynamic Combos.
When a lookup is initialized and you select its button, its query is then opened according to the base query that has been set. With a dynamic combo the query has already been set and opened before InitializeObject, so this procedure cannot be used to change the query.
FIX:
Use an initializeCombo override procedure in the Combo super procedure to change the query and re-open it. For example, in the initializeCombo override of the Dynamic Combo super procedure use:
DEFINE VARIABLE cNewQuery AS CHARACTER NO-UNDO.
RUN SUPER.
cNewQuery = DYNAMIC-FUNCTION('newQueryString':U IN TARGET-PROCEDURE,
"salesrep":U,
"B":U,
"CHARACTER":U,
"BEGINS":U,
"FOR EACH SalesRep NO-LOCK":U,
"AND").
DYNAMIC-FUNCTION('setBaseQueryString':U IN TARGET-PROCEDURE,
INPUT cNewQuery).