The Autofill feature of SimpleIndex is an easy way to associate many index fields with one document without retyping data that already exists in another application. Autofill uses a database lookup to retrieve records that match a key value entered by the user. Blank index fields are then filled in automatically with the data from this lookup. The result is a document database with many different possible search fields, of which only one needed to be entered during scanning.
The key field may be typed by the user or it may be read from the document automatically using barcode recognition or OCR. The lookup is performed either when the user changes this field or when the index values are saved. If the lookup finds multiple matching records, the user is notified and the first set of values is used by default.
The Index Autofill feature uses the same configuration options as are available with the Data Source option on the Database panel. You may use the New Data Source button to browse to an Access database, ODBC data source file, data source name or OLEDB connection string in this field.
Use the drop-down arrow to select the current data source from the Database tab. Refer to the Database settings for more information on configuring a Data Source.
You can use either a table or a view as the source for your data. The field used to lookup data should be unique for every record. If multiple matches are found, the user is given the option to select the correct value.
To configure the Index Autofill feature, you must follow these steps:
- Use the same source as the Database panel or click New Data Source to choose a different database
- Select the name of the lookup table or query in the Table or View setting.
- Select the primary database field used for lookups in the Database Key Field 1 setting. This field should uniquely identify a record in the lookup table.
- Select the corresponding SimpleIndex Index Key Field 1 in that setting. Values for this field are used to lookup records in the database.
- If a single field cannot determine a unique matching record, add Key Field 2 and 3 as needed to ensure the combination of values is unique.
- Configure fields as type Autofill in the Index Field Wizard and enter the corresponding database field names in the Template setting for each.
Configuring Autofill Video
Video was recorded in a previous version of SimpleIndex. Refer to the wiki documentation for latest updates.
Other Autofill Options
- Match on single Key Field changes the default behavior to fill in values if any key field is present instead of all.
- Allow manual input in Autofill fields: allows the user to manually type in data in Autofill fields if no matching record is found.
- Automatically select first matching record: if multiple matches cannot be avoided, check this option to automatically populate Autofill fields with data from the first matching record without prompting the user.
- Cascading List Mode sets each Autofill index as a drop-down. The selections for the drop-downs are filtered by selections in previous Autofill fields.
The Autofill settings are also used in Match and Attach mode to specify the key field(s) used to determine a matching record. In this case the Data Source and Table or View should match the settings on the Database tab.
Following the database field name is a pipe “|” followed by the field type (String, Numeric or Date). This is required for SimpleIndex to properly format the lookup for numeric and date fields. If no pipe is found, the default value of String is used.
When a unique match is not possible, users can select from a list of matching records to fill in the correct field values.
For example, a Sales Order Number could correspond to one or more Purchase Orders. If there is a single Purchase Order then the value will be filled in automatically. If there are multiple POs the user will be prompted to select one in the dialog shown here.
Cascading List Mode
Cascading List Mode lets you filter each list field by the values you select. For example, you could have lists for Vendor Name and Invoice Number, and when you select a Vendor from the list, the Invoice Number list will only show invoices from the selected vendor.
The table or view selected in the autofill settings must contain all of the items for every list field that will be used. It may be necessary to create a custom view in your database that joins records from multiple tables.
The Index Key field will be the first field displayed, and can be pre-filled using automation like OCR and barcode recognition. Configure the other fields in the cascading list group as Autofill field types. These will be displayed in the order they appear in the field list.
When processing a batch, the list selection dialog will be displayed when you set the value for the Index Key field. When a value is selected or changed and the cursor leaves the key field (by clicking or hitting Tab), the cascading list selection dialog will be displayed.
You can map an Autofill field to the Template setting for an OCR field to use the lookup to get a different template based on the key value.
This is most often used in invoice processing to get a vendor-specific pattern for the invoice number.
To configure an Autofill Template:
- Add a column to your Autofill data source
- Enter the Template corresponding to each row. You can use the standard format or Regular Expressions.
- Create an Autofill field and map it to the Template column.
- Create an OCR field and use the %FIELD#% Fixed field template, where # is the field number for the Autofill field created in the last step.
Since the template gets the value using a Fixed field string instead of the Autofill lookup directly, it is also possible to dynamically build templates from multiple fields and Fixed field variables.