Kbase 15437: Compilation error using calculated fields in a Smartbrowser
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Compilation error using calculated fields in a Smartbrowser
This knowledgebase entry describes one reason a customer might receive
compilation error 247 when using calculated fields in a Smartbrowser.
In this case the Check Syntax button in the Calculated Field Editor in
the UIB will say the syntax is correct when there is, in fact, a
problem with the syntax.
If, in the Expression field an expression such as
STRING (TIME, "HH:MM") @ my-var
is used (the @ <fieldname> syntax is required here by the
Smartbrowser) the Check Syntax button will report that the syntax is
correct. However, when the program is compiled the following message
is issued:
Cannot understand after "STRING (TIME, " (247)
This is because the quoted string in the &FIELDS-IN-QUERY preproccesor
variable is not supported. This is a known issue.
The way to resolve this is to define a variable in the Definitions
section representing the format you desire.
DEFINE VARIABLE my-format AS CHAR INITIAL "HH:MM" NO-UNDO.
Then, in the Expressions field on the Calculated Fields Editor, use
this variable instead of the quoted string.
STRING (TIME, my-format) @ my-var
This will eliminate the compilation error caused by quotes in the
expression.
Progress Software Technical Support Note # 15437