Kbase P78985: How to use the ADD-CALC-COLUMN( )method to create a calculated static browse column when the browse
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  05/05/2004 |
|
Status: Unverified
GOAL:
How to use the ADD-CALC-COLUMN( )method to create a calculated static browse column when the browse query is a dynamic query?
FIX:
1. To add the calculated column to the browse use code similar to the following example:
CalcHnd1 = brwViewOrder:ADD-CALC-COLUMN("INTEGER",">999","0","OrderToShip")
2. To poulate the calculated fields at run time. Create a DISPLAY-ROW trigger for the browse that includes code similar to:
IF VALID-HANDLE(CalcHnd1)THEN
CalcHnd1:SCREEN-VALUE= string(hField2:BUFFER-VALUE - hField1:BUFFER-VALUE).
3. See the attached note for a complete example.