Kbase P116212: How to access a calculated field in a browse?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
How to access a calculated field in a browse?
GOAL:
How to recompute a calculated field?
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
FIX:
To access an anonymous calculated field in a browse:
1. use the GET-BROWSE-COLUMN method with the column position as a parameter to get a column handle.
2. use the SCREEN-VALUE attribute of the column handle to retrieve or change the value of the field.
To recompute all calculated fields in a browse, use the REFRESH method.
To give a name to a calculated field in a browse query, use the @ syntax after the field expression. For example:
DEFINE VARIABLE f1begin AS CHARACTER NO-UNDO.
DEFINE BROWSE BROWSE-1 QUERY BROWSE-1 DISPLAY
MyTable.Field1 COLUMN-LABEL "Field 1" WIDTH 10
SUBSTRING(MyTable.Field1, 1, 3) @ f1begin COLUMN-LABEL "First 3 chars" WIDTH 3