Kbase P130027: Field FORMAT reset after each iteration of loop
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/04/2008 |
|
Status: Unverified
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Versions
SYMPTOM(s):
Field FORMAT reset after each iteration of loop
When setting FORMAT attribute at runtime, the format value is lost the second time the field is displayed
DEFINE TEMP-TABLE tt
FIELD f1 AS CHARACTER
FIELD f2 AS LOGICAL
tt.f2:FORMAT IN FRAME a = "Yes/No".
FOR EACH tt:
DISPLAY f1 f2 WITH FRAME a 10 DOWN.
DOWN 1 WITH FRAME a.
END.
CAUSE:
This is expected behavior. When a DOWN frame iterates Progress creates a new field group in the frame and the fields in this new field group are generated from the r-code definition of the fields, which is not affected by runtime FORMAT changes.
FIX:
To workaround this issue do one of the following:
- Set the FORMAT for the field in the field/frame definition
- Reset the attribute before every time the field is displayed
- Use the STRING function to specify the FORMAT at display time:
e.g.
cFormat = "Yes/No".
FOR EACH tt:
DISPLAY f1 STRING(f2,cFormat) WITH FRAME a 10 DOWN.
DOWN 1 WITH FRAME a.
END.