Autofill Query Setup

An Autofill Query in Formatta E-Forms Manager defines the specific data that will be retrieved from the Autofill Data Source.  Formatta 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 Formatta 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 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:










      • Dialog Message: In this field, you can enter a custom message that will be displayed at the top of the dialog window when the form user initiates an Autofill operation.  This allows you to provide specific instructions on what type of information the user should provide in the dialog fields.


      • Dialog Field Label: In this field, you specify the label that will appear next to the dialog field, instructing the form user on what to enter into the field.  For example, if the query parameter dialog needs the user to enter an account number, your label might say "Account Number."


      • Mask Input: If you check this box, the data entry field will show asterisks in place of characters input by the user.  this is useful when a query parameter represents sensitive information such as a password.


      • Display Order: This value determines the order in which the label and field for the query parameter are displayed in the query parameter pop-up window.






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.