Kbase P96366: SmartQuery and the AppBuilder's Fields Used Option
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/19/2004 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.x
SYMPTOM(s):
Cannot use the Fields clause with V8 SmartQueries
Using the Progress AppBuilder Development Tool
Created a SmartV8Query Object
Set the Returned Column within the Query Builder Options Screen to "Fields Used"
AppBuilder generated code contains a DEFINE QUERY Statement with an empty FIELDS() clause
The same approach works with SmartBrowsers
CAUSE:
This is expected behavior. Since the SmartQuery Wizard does not require the user to pick up some fields during the build process of the SmartQuery Object, Progress does not include any fields within the FIELDS clause of the AppBuilder generated DEFINE QUERY Statement
FIX:
In order to specify a list of fields to include in the SmartQuery, perform the following steps:
1- Open the SmartQuery Object with AppBuilder
2- Hit the AppBuilder's "Object properties" button so that the Query Builder Dialog comes up
3- On the Query Builder Screen, select the "Freeform Query..." button
4- Select "Freeform. Allow freeform editing of query" on the PROGRESS Advisor Dialog and click on the OK button
5- Hit the AppBuilder's "Edit code" button so that the Section Editor Screen comes up
6- On the Section Editor Screen, switch to the Triggers section and hit the "New..." button
7- On the Choose Event Dialog, highlight the DEFINE_QUERY event and hit the OK button so that a DEFINE_QUERY trigger is created for the Query Object
8- Modify the AppBuilder generated code under the created DEFINE_QUERY trigger and add a FIELDS clause to the DEFINE QUERY Statement.
e.g.: DEFINE QUERY Query-Main FOR Employee FIELDS(FirstName EmpNum) SCROLLING.