Creating Form Queries

Use this procedure as a general guideline for creating form queries through the Query Builder. Form queries, when placed in your custom applications, can update the database. However, when you execute the form query through the Query Builder, the query is "read-only."

When creating form queries, you can use the following application data objects to define the query:

Object Description
Data area The data area or data ID that contains the form you want to use in the query.
System code System codes are subsets of the product line, and contain the forms you want to use in the query. To select a form, you must expand the list of system codes and then expand the specific system code that contains the form you want.
Form Forms provide access to the data you want to query.

You can also control the data in the query by using command properties. These command properties include controlling the key level specified as an end of set condition, overriding the form's default function codes, and controlling the read/write status of the query.

To create a form query

  1. Log in to Query Builder.
  2. Select AGS from the Select Command menu to set the command type to form queries.
  3. In the left pane of the Query Builder, locate the form that you want to query.
  4. Double-click the form ID to add it to the form query.
  5. Replace any occurrences of "*****" with values or variables for the indicated required fields.
  6. Optional. Set the key level. Setting the Key Level
  7. Optional. Modify the function code output. Modifying Function Code Output
  8. Review the query in the lower right pane of the Query Builder.
  9. Click Execute to test the query.

    If the query has problems and the problems are not obvious, you might want to set Execution Logging to Server Calls to Log File. See Execution Logging for more information.

  10. When the query works correctly, save the query.
  11. To make the query available to your VB or other application, select the text of the query and then select Copy from the Edit menu to place your query on the Windows clipboard.