Kbase P161318: EXPORT statement containing IF...THEN...ELSE function exports field twice
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/4/2010 |
|
Status: Unverified
SYMPTOM(s):
EXPORT statement containing IF...THEN...ELSE function exports field twice
Statement exports the value in a database field if the value in a temp-table is different, or "No Change" if it is not, using code similar to the following:
EXPORT Customer.Address (IF Customer.Address <> tCustomer.Address THEN Customer.Address ELSE "No Change"
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
CAUSE:
The IF...THEN...ELSE function returns the THEN expression value if the condition is true, and the ELSE expression value if the condition is false. In this code, the Customer.Address field is both one of the terms being compared in the condition and the THEN expression itself. The EXPORT statement is specifying the Customer.Address field separately in the display list. Therefore, when the condition is true and the value of Customer.Address is returned by the IF...THEN...ELSE function, the value displays twice.
FIX:
Remove the extra field specification from the display list, leaving only the return value of the IF...THEN...ELSE function.