Kbase P185539: Error 223 using UltraNumericEditor.VALUE in a FIND statement
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/04/2011 |
|
Status: Unverified
SYMPTOM(s):
Error 223 using UltraNumericEditor.VALUE in a find statement
Source code FIND statement, where one part of the query is ultraNumericEditor:VALUE results in compilation errors 223 and 196.
FIND FIRST <table> WHERE <field> = ultraNumericEditor1:VALUE.
Incompatible data types in expression or assignment (223)
** Could not understand line. (196)"
FACT(s) (Environment):
Windows
OpenEdge 10.2x
CAUSE:
This is expected behavior. The value property of the UltraNumericEditor returns an object reference rather than the value because it is an object, not a constant. This is not shown when using a MESSAGE statement to display the value or when assigning to an integer or decimal field because the ABL understands the context of the reference and uses the toString method on the object to extract the value.
FIX:
Use the toString method on the object to extract the value. For example:
FIND FIRST <table> WHERE <field> = INTEGER(ultraNumericEditor1:VALUE:toString()).