Kbase P18249: Sophisticated Browse Freeform Query returns unexpected recor
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  19/03/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.X
SYMPTOM(s):
Sophisticated Browse Freeform Query returns unexpected records
A condition using a 4GL function such as LOOKUP() or SUBSTRING() or INDEX in the where-clause of the OPEN_QUERY section seems to be ignored
No error message
CAUSE:
Known issue. The '{&OPEN-QUERY-{&BROWSE-NAME}}' and '{&QUERY-STRING-{&BROWSE-NAME}}' preprocessors are formatted by the AppBuilder in such a way that'... EACH MyTable WHERE LOOKUP(myField,"1,2") > 0.'becomes corrupted with: ... EACH MyTable WHERE LOOKUP(myField,
"1, ~
2") > 0 .
=> Notice the offending leading spaces and carriage return before the '2'
It seems that it occurs especially with commas used in string expressions which are taken as parameter separators of 4GL functions.
FIX:
Either move the OPEN QUERY phrase to an internal MyProcedure and put "RUN MyProcedure." in the OPEN_QUERY section of the browse. Then the OPEN-QUERY-{&BROWSE-NAME} preprocessor contains only 'RUN MyProcedure' which does not lead to any preprocessor formatting problem.
Or get rid off the commas in the string expression such as using 'WHERE LOOKUP(myField,