Consultor Eletrônico



Kbase P3843: How to add fields to a SmartDataObject (SDO) from Query Builder after you have used a Freeform Query
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/01/2005
Status: Unverified

GOAL:

How to add fields to a SmartDataObject (SDO) from Query Builder after you have used a Freeform Query?

FACT(s) (Environment):

Progress 9.1X
OpenEdge 10.x

FIX:

FreeForm queries are intended as a last resort and should only be used when there is absolutely no way of building the query in the Query Builder. A Freeform Query comes with a warning that once you use it you give up certain functionalities offered by the AppBuilder for regular queries.
One of the pieces of functionality you lose is the ability to go into the Query Builder and add more fields to the query (SDO in this case).

Follow these steps to add fields to an SDO:

(Please note that starting with Version 9.0B, this restriction goes away.
You are able to add/remove fields from the SDO query even if the query has been changed to a Freeform Query.)

1) Open the <SDO-Name>.i file in the Procedure Editor.

2) Add a space and a tilde (~) to the end of the last line in the include file.

3) Add the field(s) you want to the include file. The format is as follows:

FIELD <Field-Name> LIKE <Table-Name>.<Field-Name> VALIDATE ~

4) Save the include file.

5) Recompile the SDO and its <SDO-Name>_CL counterpart.

6) Recompile every SmartDataViewer and SmartDataBrowser that uses the SDO.