Form Setup for Autofill

Formatta Designer Application IconIn order to enable a form for Autofill using an Autofill Handler that you have defined in the Formatta s Manager catalog, you need to make a few simple changes to the form in Designer. Once this form is complete, you can upload the revised form to your catalog, then test the Autofill operations.

Note: No form changes are necessary to make the form support Autofill Handlers of the On Download type.

PREPARING YOUR WORKSPACE

To make the appropriate modifications to the form that will be used, follow the steps below:

 

1. Open Formatta Designer.

 

2. In Designer, open the Formatta E-Forms Manager Catalog if it is not already open.  To do this, right-click anywhere in the Catalog area of Designer and choose Catalog -> Open. Browse to E-Forms Manager.cat, which is located under My Documents\My Forms\E-Forms Manager Sample Forms.

 

3. Open the form you wish to set up, by choosing File -> Open from the main menu.  The default folder to save forms in Designer is My Documents\My Forms.

FIELD SET CONFIGURATION

If your form is going to call an Autofill Handler that requires parameters to be passed from form fields to the query, you will define a field set that will be used to pass data from the form to Formatta E-Forms Manager.  This step is not necessary for Autofill operations that do not need query parameters, or which receive query parameters from a pop-up dialog.

 

Each field set will have the following requirements:

 

 

 

To create the field set:

 

1. Choose Form -> Field Sets from the main menu.  This will open the Manage Field Sets dialog window.

 

2. Click the Add button, and in the Set Name field, enter a unique name to identify the set of fields you will define. This set must be named exactly like an Autofill Handler, but with "_set" appended to the name. For example, if you want your form to use an Autofill Handler named "emp_info", you must create a field set called "emp_info_set".

 

3. With the field set selected, click the Edit button. This will open a dialog window where you can assign fields to this field set.

 

4. Choose all of the fields whose data will be used as Autofill Query parameters, and click the Select button to add them to the field set.

 

5. Click OK to close this dialog.

 

6. If your form is going to call multiple Autofill Handlers that require form field data parameters, repeat steps 2-5 to create the additional field sets.

 

7. Click OK to close the Manage Field Sets dialog.

ADD AUTOFILL HANDLER CALLS

Now that the required field sets have been defined, you will add the commands to the form that will call Autofill Handlers in Formatta E-Forms Manager.

 

1. In Designer, drag the Autofill catalog object out of the Formatta E-Forms Manager Form Catalog and place it onto the form.  Place it in the section of the form you wish to Autofill that corresponds to the field set you just configured.

 

2. The Autofill catalog object contains three items:

 

 

You may rename the button by clicking it once and typing the new text onto the button, or by typing into the "Text" property in the button's property sheet.

 

Note that your form may also invoke Autofill operations from other form events without the use of a button.  The steps that follow describe only the Remote command itself, so if you want to you may delete the button and place the Remote command in any part of the form that allows it, then continue through the following steps.

 

3. Double-click the button that you just added to the form to open up its command list.  

 

4. In the command list dialog, select the Remote command that is showing. If the Autofill Handler to be called by this Remote command requires one or more form fields as parameters, use the field set name you created above as the second argument to the Remote Command.  Otherwise, you may leave the second parameter empty.  As the third parameter to the Remote command, enter the exact name of the Autofill Handler that you want to invoke.

 

The table below describes the meaning of each of these three parameters:

 

Parameter

Description

field:formatta_efm_autofill_url

The first argument to the Remote command is the Formatta E-Forms Manager server URL that will be called.  In this case, the URL is located in the formatta_efm_autofill_url field (the blue field that was dragged into the catalog along with the Autofill button).  This field is invisible to Filler users and is populated by Formatta E-Forms Manager when the form is downloaded with the proper URL of the Formatta E-Forms Manager server.

handler_X_set

The second argument to the Remote command is the name of the field set whose data will be encrypted and sent to the server. In this case, you specify the "handler_X_set" field set since it contains the fields that will be populated by the Autofill Handler.

 

Note: This parameter is only required when your Autofill Handler requires form field data for query parameters.  Otherwise it may be left blank.

handler_X

This argument specifies the name of an Autofill Handler that you created during Autofill Handler Setup, which will be invoked by the Remote Command.

 

 

5. Click OK on the command dialog to close it.

 

 

AUTOFILL HANDLER REMOTE COMMAND SAMPLES

 

Below are examples of the two ways in which you would provide parameters to a Remote command, depending on whether or not your form needs to provide field data as query parameters to an Autofill Handler:

 

 

When your Autofill Handler does not require form field data as query parameters, your Remote Command only needs the Formatta E-Forms Manager URL as the first parameter and the Autofill Handler name as the third parameter.  The second parameter may be empty, but you need to keep the comma in place to separate the parameters.  

 

Sample Parameters: field:formatta_efm_autofill_url, , emp_info

 

 

If your Autofill Handler requires form field data as query parameters, your Remote Command needs the Formatta E-Forms Manager URL as the first parameter, the name of the field set containing fields used as query parameters, and the Autofill Handler name.  The field set specified must be named exactly like the Autofill Handler, but with "_set" at the end.  

 

Sample Parameters: field:formatta_efm_autofill_url, emp_info_set, emp_info

 

 

AUTOFILL OF TABULAR DATA

If your form contains table controls or rows of fields that you want to populate by retrieving multiple rows of data from the database and placing them into the form, there are several steps you must follow with regard to the form design, query definition and Autofill Handler mapping.  For more information on how to do this, see the section on Using Autofill for Tabular Data.

 

 

UPDATING YOUR FORM IN FORMATTA E-FORMS MANAGER

Once you have finished your form changes in Designer:

 

1. Save the form and close it.

 

2. Go into the Formatta E-Forms Manager catalog, and go to edit the version of the form for which you have configured Autofill Handlers.

 

3. Upload a Revision of the form version to the Formatta E-Forms Manager catalog.  

 

You will now be ready to try your Autofill configuration.