Consultor Eletrônico



Kbase P43326: How to add a column to a browser which is not part of the bu
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/09/2003
Status: Unverified

GOAL:

How to add a column to a browser which is not part of the buffer's fields

FACT(s) (Environment):

Progress 9.1x

FIX:

Add a calculated field to the browser where its expression contains a user defined function.
For example:
Using sports database, the query is defined as FOR EACH order NO-LOCK.
And the intention is to add customer's name in the browser.
Create a function
FUNCTION getName RETURNS CHARACTER ( piNum AS INTEGER ):
FIND customer WHERE cust-Num = piNum NO-LOCK NO-ERROR.
IF AVAILABLE( customer ) RETURN customer.name.
ELSE return ?.
END.

Add a calculated field which has getName( order.cust-num ) as its expression.