Consultor Eletrônico



Kbase P101949: The SDO query modified with assignQuerySelection reverts back to original base query
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/9/2005
Status: Unverified

FACT(s) (Environment):

Dynamics 2.1A
Dynamics 2.1B

SYMPTOM(s):

The SDO query modified with assignQuerySelection reverts back to original base query

assignQuerySelection used in SDO's initializeObject works for the first opening the query, but fails afterwards

The query modified with assignQuerySelection does not preserve the filter conditions

CAUSE:

This is expected behavior. Any filter applied to the SDO query will
reset the query string to the SDO's original base query.

FIX:

Any change in the query string being done after the sdo has been initialized
will cause that the query reverts back to the original base query.
In order to prevent this, use the following code example in the SDO's
initializeObject procedure:

/* Code example for the dynSDO data logic procedure */
DEFINE VARIABLE cClient AS CHAR NO-UNDO.
DEFINE VARIABLE cBaseQuery AS CHAR NO-UNDO.
RUN SUPER.
cClient = DYNAMIC-FUNCTION("getPropertyList":U IN gshSessionManager , INPUT "CurrentOrganisationCode" , INPUT TRUE).
DYNAMIC-FUNCTION("assignQuerySelection" IN TARGET-PROCEDURE , "spClient" , cClient , "EQ").
cBaseQuery = DYNAMIC-FUNCTION("getQueryString" IN TARGET-PROCEDURE).
DYNAMIC-FUNCTION("setBaseQuery" IN TARGET-PROCEDURE, cBaseQuery) .

or for the static SDO the code example is:

/* Code example for the static SDO */

DEFINE VARIABLE cClient AS CHAR NO-UNDO.
DEFINE VARIABLE cBaseQuery AS CHAR NO-UNDO.
RUN SUPER.
cKlient = DYNAMIC-FUNCTION("getPropertyList":U IN gshSessionManager , INPUT "CurrentOrganisationCode" , INPUT TRUE).
DYNAMIC-FUNCTION("assignQuerySelection" IN THIS-PROCEDURE , "spClient" , cClient , "EQ").
cBaseQuery = DYNAMIC-FUNCTION("getQueryString" IN THIS-PROCEDURE).
DYNAMIC-FUNCTION("setBaseQuery" IN THIS-PROCEDURE, cBaseQuery) .