Autofill Query Setup

An Autofill Query in E-Forms Manager defines the specific data that will be retrieved from the Autofill Data Source.  E-Forms Manager lets you define an Autofill Query by walking you through a wizard that collects the necessary information to set it up properly.  Each query definition requires you to enter specific information that will determine how it is used by Autofill Handlers to retrieve data and populate forms.

 

To access the Autofill Query Setup wizard in E-Forms Manager, go to the Administration tab, and choose the DB Integration option.  

 

 

 

Defining an Autofill Query

From the Database Integration screen, choose the Autofill tab (which is the default), and click the New Autofill Query link.  

 

This starts a wizard that allows you to step through the configuration of your query. You may proceed through the wizard using the Next , Back and Cancel buttons.  During the configuration process, you will provide information about the query and how input parameters may be supplied to it, along with information about the expected results, using the fields described below:

 

 

 

 

 

Example 1: Results of a Single-result Autofill Query

 

 

 

 

Example 2: Results of a Multiple-result Autofill Query in a choice list dialog

 

             

 

 

Example 3: Results of a Multiple-results Autofill Query in a combo box field

 

 

 

 

 

 

 

Example 4: Results of a Multiple-Repeating-results query in a form table

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When you have completed the Autofill Query Setup, click Finish .

 

 

Reviewing Configuration Settings

Completing Autofill Query Setup returns you to the Autofill section of the DB Integration screen. You now see your queries in a list which is ordered by query name. Each query listing also specifies the number of expected results (Single, Multiple, or Multiple-Repeating) and an indication of whether or not it is in use or editable.

 

 

 

Items in the list include:

 

 

If you want to edit the query, you may click the In Use link to view and/or automatically disable any Autofill Handlers that use the query. If you disable the handlers from this window, you will then be able to edit the query.

Note: If you disable an Autofill Query from this screen, you will then have to go to an Autofill Handler that uses the query to re-enable it.

 

Once you are finished setting up all your queries, you can now configure your Autofill Handlers.

 

 

Testing an Autofill Query

Once an Autofill Query has been defined, you can test your query in order to verify proper syntax and operation before assigning it to a form.  To test an Autofill Query:

 

Step 1: Choose the Autofill Query you wish to test from the Autofill Query list.  Click on the row showing the query to open the Query Details screen.

 

Step 2: From the Query Details screen, click the "Test Query" button.  This will open a dialog for testing the query.

 

Step 3: On the Test Autofill Query dialog, choose the Data Source against which you want to test a run of the query.  If the query requires any parameters (from the form, from a dialog, or from a request parameter), a list of the named parameters will be shown, and next to each an entry field will be available.  Into each parameter field, enter a sample value.  Use values that you know should result in one or more records being found in the database.  Do not include quotes around character or date values, as those should already be accounted for within your query syntax.

 

 

Step 4: Click the "Continue" button.  The query will be run using any parameter values you provided, against the data source you chose.  If the query runs successfully, a message will indicate how many records were retrieved by the query.  

 

 

If the query fails, the error message provided by the database will appear, and should indicate specifically what is wrong with your query.  You should then be able to edit your query to correct any errors.