Lookup Extender

The Lookup Extender allows you to improve and customize any searches you plan to run on the various SQL databases connecting to your eCopy ShareScan Manager. You can use any connected MFP to run SQL queries on the servers connected to the particular Manager the device is attached to. The extender also allows you to get input data by selecting from options coming from a database or CSV file, and to enter data manually. In general, the purpose of the extender is to enable the configuration of complex business automation workflows, in most cases in conjunction with the usage of extenders (typically, eCopy Forms Processing Extender, or similar) and document services (for example, Image Control).

To be able to use this extender with the Email and folder watching service, you need to configure it in such a way that it does not involve end-user interaction (express). To ensure this, clear the Show Validation Screens check box in the configuration page.

  • Lookup Extender profiles can be executed during scan, if the given profile is located before the Scanning with Preview SCREEN shown/not shown item in the Order of Operation dialog. Bear in mind that the selected or cleared status of the During scan check box next to the User data entry setting does not have any effect on the Document Service/Extender profile processing order, it is only responsible for determining when the connector forms appear (during scan or after scan). For details on profile orders, see Order of Operation section.
  • If the Lookup Extender profile is configured to be processed during scan (moved before the Scanning with Preview Screen shown/not shown item in the Order of Operation dialog) and the lookup value has to be applied for all batches in the workflow, then the lookup result key has to be added to the value of the PublishingKeysForAllBatches registry key with fully qualified name. For more information on this registry setting, see Batching and routing in ShareScan.

Configuring the extender

Before configuring the Lookup Extender, configure the Image Control or the FPE extenders (or the extenders and document services you want to use) to ensure that data publishing keys resulting from a barcode recognition or zonal OCR are set up properly.

As the extender interacts with databases supported by OLE DB, you must ensure that you have the relevant OLE DB driver installed when you plan to use a database type which is not supported by Windows by default (for example, Oracle).

The ShareScan software includes timers that automatically log you off after a certain period of inactivity. However, when the Cost Recovery Service is enabled, these timers are disabled and you remain logged on until you press End or Complete on the terminal, or until the terminal times out.

To configure the extender:

  1. Select the Services tab in the ShareScan Administration Console. This tab displays a list of available services.
  2. Select the Lookup Extender service.
  3. Click New to create a new connection (or select a database you want to connect to) on the Databases tab of the Configure Document Service (Lookup Extender) window.
  4. Create a query to use the Lookup Extender.
  5. Use the Lookup settings tab to fine-tune the settings used when performing lookup queries on the connected database.
  6. Use the Settings tab to regulate additional settings.
  7. Click Save Current Profile or Save Current Profile As to save your settings.

Databases tab

The following table describes the settings available on the Databases tab. The tab displays the name, type, and connection string for the stored database connections.

Setting

Description

New

Click this button to add a new database connection to the Extender. After clicking the New button, the Recent data sources dialog window is displayed, listing the already-existing connections. If there is no previously created database connection, the Configure data source dialog appears instead. You cannot duplicate databases as in case of SQL database; you cannot add the same catalog connection again to the profile before deleting the existing one. Click an existing connection on the Recent data sources dialog, and select OK to clone the connection. Click New to display the Configure data source window, which allows you to provide data for a new database connection.

Remove

Click this button to remove a selected database connection.

Edit

Click this button to edit the properties of the selected database connection.

If ShareScan has a previously configured database then the Recent data source window appears when you click New.

You can select a previously configured database and accept it with the OK button (only available when a source is selected). Clicking the New button closes the Recent data sources window and the Configure data source window appears. Click Remove to delete a source form the list (it will be deleted only from Recent data sources).

Access this window by clicking New on the Databases tab, and selecting the New option on the Recent data sources screen, if there is no previously created database connection. You can set the following options:

  • Database type: use the menu to select your database.

    Since Microsoft deprecated the Microsoft Jet 4.0 OLE DB Provider (https://msdn.microsoft.com/en-us/library/ms810810.aspx), and future Windows update may remove it from the system. Configuring a 'Microsoft Excel 97-2003' data source on machines without a Microsoft Jet 4.0 OLE DB Provider results in an error message. In case you still wish to use the old format .xls files, install 32 bit version of Microsoft Access Database Engine 2016 Redistributable (https://www.microsoft.com/en-us/download/details.aspx?id=54920) or later and configure Database type for Microsoft Excel 97-2003 in the Configure data source dialog by selecting old format .xls files via setting the filter to All files (*.*) on the Windows File Open dialog.

  • Settings: Depending on the selected database, the specific setting options vary.
    • Microsoft Access, Microsoft Excel 97-2003, Microsoft Excel, Comma Separated Text (CSV) (the following settings are common for these database types, with only the displayed pathname changing):
      • Path to <database type> database: Type the folder path or click the ... (browse) button to navigate to the location of the database file.
      • Blank username and password: Select this option if you do not want to enter a specific set of credentials for accessing the database. If the option is checked, the user is prompted to enter credentials to access the database (usually this is not the preferred way of setting up the access, as administrators do not want to put the burden of an additional authentication on the user).
    • Microsoft SQL:
      • SQL Server: Use the menu to select the available SQL database instance.
      • Catalog/Database: Use the menu to select the catalog you want to use.
    • Other:
      • Data Source Connection String: Enter the connection string of your database here.
      • Build String: Click this button to open the Data Link Properties dialog and put together a database-specific connection string.
      • Click through the options of this short Wizard to put together a connection string for your database:
        • On the Provider tab, select your OLE DB provider and click Next.
        • On the Connection tab (default view), enter the data source and login credentials into the appropriate fields, and click Test Connection to check the data.
        • On the Advanced tab, you can set the relevant network settings, connection timeout and access permissions to the database.
        • On the All tab, you can check all the data link properties once more, and if so inclined, you can edit them here manually, by simply clicking the row you want to edit and filling out the Property Value.
        • Click OK to finish setting up the data link properties.
  • Test: After specifying the connection settings, you must click Test to check if the connection works. A notification is shown about the actual state: Not yet tested, Test failed or Test succeeded. If the connection test is successful, you can click OK to create the database connection.

Make database file password protected

To make a database file password protected, you have to configure Data Link Properties the same way as described above; the only difference in setup is on the All tab. Select the Database Password row and double-click on it or click the Edit Value… button.

The Edit Property Value window pops up. Enter the password in the Property Value field and click OK to confirm the password. Click Reset Value to delete the password and provide a new one.

When you are done, go back to the Connection tab and click the Test connection button. Click OK to save your settings.

Lookup settings tab

The following table describes the settings available on the Lookup settings tab. The tab allows you to create, customize, and modify lookup operations for your workflows. The order inside the lookup list is the same as the execution order in runtime (from top to bottom).

Setting

Description

New

Click this button to add a new query to the Extender. Clicking the button opens the Lookup editor.

Edit

Click this button to edit the properties of the selected query. The Lookup editor is displayed, as with the New option, above.

Copy

Click this button to create a copy of the selected query. Using this option is advised if you are planning to use a number of queries, which differ only in minor details. This function also works if you highlight a lookup and then press [CTRL] while clicking on Copy. The copied original lookup is inserted to the copy as evaluation condition with Is not blank setting.

Remove

Click this button to remove a selected query.

Move up

Moves the selected Lookup result key up in the list.

Move down

Moves the selected Lookup result key down in the list.

The Lookup Editor window has four main sections, allowing you to create and modify queries.

  1. "Naming section"
    • Lookup result key: Enter the name of the data publishing key you want to use for finding the results. This key will be the output of the lookup operation. If left empty and the rest of the dialog is filled, this field is populated automatically, based on the values of different fields; it can be edited any time if the dialog populates it automatically.
    • Display label: Enter a label of the text field that is displayed on the MFP UI for the specific field. If left blank, the field is populated automatically based on the value of the Lookup result key field.
  2. "Lookup type section"
    • Lookup type: Allows you to select any of three lookup query types to be used; each type features different settings (see step 3 below).
    • Lookup evaluation condition:
    • When the always evaluated option is selected, the lookup specified is always performed.
    • If the Evaluated if condition is fulfilled option is selected, the specified condition is evaluated – a selected data publishing key is checked if it is not blank, equal to a specified value, or matching a regular expression; the lookup operation is performed only when the result is true.
  3. "Lookup section"
    • Database lookup: Select it to use the simple, user friendly editor to set up the lookup criteria.
    • Custom SQL query: You can use complex SQL queries (specified in a text editor window):
      • Custom SQL query – With skeleton You can get a SQL “skeleton” if you first select Database lookup and provide some relevant data for the empty fields and then switch Lookup type to Custom SQL query. Once you switch over, the custom SQL query field is populated with the data you entered previously for the Database lookup. This makes it easier to edit any custom SQL query.
    • Expression: Allows you to specify C# expressions, ensuring full flexibility in comparison and working logic.
      • Expression templates: Use the menu to select specific C# expression templates. When selected, you can click the pencil icon to copy the expression into the editor window. Clicking the msdn button opens a browser and displays the expression-specific MSDN article (if you have an active Internet connection).
  4. "Behavior section"
  5. Lookup behavior: Use this menu to set the number of results the query should consider. Select One value only if you are looking for a specific database entry; otherwise, select Multiple values or not required.
    • When One value only is specified, and the result of the lookup was a single value, the UI interaction is initiated (at the MFP). If the lookup was not successful (value not found), the user has to enter a value into a text box at the MFP. If there are multiple values returned by the lookup, the user is prompted to select from the available values.
    • When the Multiple values or not required option is selected and the result of the lookup is a single value or no matching item is found, that single value or an empty value is used. If there are multiple values in the result, all are included in the result data publishing key, separated by a separator character. The separator character can be set on the Settings tab of the Configure Document Service (Lookup Extender).
    • Always evaluated: Controls how empty values affect lookup evaluation; checked: lookup is always evaluated even if there are empty variables; unchecked (default): lookup is evaluated only when all variables are set.
    • Visible: Controls query visibility.
    • User modify: Controls whether users can modify lookup values of the query.
    • Preserve value: If checked, selected lookup values are populated for the next query; if unchecked, new values must be provided for the next query.

Test: Click this button to test your query.

In case of barcode input, multiple value contains all elements of result set separated by a given separator. In case of user-entered value, the user must select from a result set (same as One value only behavior ).

If a user needs a list with all results (for example, email addresses) s/he needs to use barcode for input. The user can also create a second Lookup Extender profile with express mode, referring the first Lookup Extender profile's user-entered lookup.

Lookup Test Dialog

Before you can finalize your lookup, you have to test your settings by clicking the Test button. The Lookup test dialog appears.

Enter a string in the Value field and click Execute. The result is displayed and the OK button becomes active.

After a test is executed, the bottom information line displays the query execution details.

After test execution, the Store test values check box appears: select this check box to automatically fill the form on subsequent tests.

The check box appears only after a test is executed. If there is no filter which requires a value, the check box does not appear.

Click the OK button to close the Lookup test dialog. Now the OK button on the Lookup editor window is also active, click it to have the new lookup appear in the Lookup result keys list.

Settings tab

The following table describes the settings available on the Settings tab. The tab provides you with further configuration options for customizing the Extender workflows.

Category

Setting

Description

General

Separator for multiple values

Use this to set the separator character for the query results. (Used only if the Lookup behavior setting is set to Multiple values or not required).

If lookup fails

Use this list to set the behavior of the extender in case the lookup does not produce results. You can select the following:

  • Abort workflow: This option completely aborts the query workflow, and puts you back on the main extender screen.
  • Consider as blank: This option displays a blank results page, and you can re-run the query with the option of altering any parameters.

Show validation screens

Checking this option results in the extender displaying the validation screen on the MFP screen, allowing you to check the query settings once more prior to running the query.

Validation screens

Batch-based

By checking this option, the user is asked for a selection/entry at each batch process; if left unchecked, the user is asked for a selection/entry only once.

Header text/value

Defines a label in the form header; the actual header is <your value> | 1/4 where the user is at batch 1 of 4.

The icon might overlap the title of the Lookup result filter screen, if the default text is too long for specific languages. To avoid this, type a shorter text here.

Search on

  • Starts with: Search starts with the string specified
  • Contains: Search contains the string specified

Data review screen

Enabled

When Data review screen is enabled, the last lookup's value is used on the review screen.

Header text/value

Defines a label in the form header; the actual header is <your value> | 1/4 where the user is at batch 1 of 4.

Confirmation is required

Select this check box to confirm previously specified settings.