Creating a VB Script to Enable External AutoFill Keyword Sets - AutoFill Keyword Sets - Foundation 23.1 - Foundation 23.1 - Ready - OnBase - Essential - Premier - Standard - external - Standard - Essential - Premier

AutoFill Keyword Sets

Platform
OnBase
Product
AutoFill Keyword Sets
Release
Foundation 23.1
License
Standard
Essential
Premier
CAUTION:

VB Script functionality is being maintained for backwards compatibility, but it is no longer recommended and may be removed in a future release. Consider adopting Unity Scripts instead.

You can use a VB Script query to communicate with the external database and identify Primary and Secondary Keyword Values when users trigger an AutoFill Keyword Set during indexing or re-indexing.

CAUTION:

When using external AutoFill Keyword Sets with a VB Script in the OnBase Core (for example, in the Web Client), currency Keyword Values must not contain a comma (,) or currency symbol (for example, $) as part of the Keyword Value. If the currency Keyword Value contains either of these characters, the value will not be displayed when the Autofill Keyword Set is expanded.

Note:

External AutoFill Keyword Sets configured with a VB Script are not supported by the 64-bit Application Server.

To create a VB Script to enable External Keyword Data Sets:

  1. Ensure that the Enable VB Script option for External AutoFill Keyword Sets and Data Sets option is enabled. This option is found in the OnBase Configuration module under Global Client Settings. For more information, see the System Administration documentation.
  2. Create the VB Script. Depending upon whether or not this VB Script will be used to accommodate more than one AutoFill Keyword Set, the required parameters vary. Required parameters include the following:
    • The VB Script must programmatically provide Primary Keyword Values or a way to obtain them

    • The VB Script must programmatically provide a way to return all of the Keyword Types required by the AutoFill Keyword Set in the proper order in the external database, Primary Keyword Types followed by all Secondary Keyword Values

    • The VB Script must identify the AutoFill Keyword Set configured in the Configuration module if the VB Script is calling more than one AutoFill Keyword Set table

    • The script that satisfies the external AutoFill Keyword Set should implement the following entry point:

      Sub GetKeywordSetRecords(primaryValue, context, results)

      End Sub

      • The first parameter, primaryValue, indicates the Primary Value for the AutoFill Keyword Set. Secondary Values should be returned based on this primary.

        CAUTION:

        Do not use wildcard operators when configuring primaryValue. While the External AutoFill Keyword Set may appear to be successfully configured upon testing, wildcard operators are not supported and can cause unexpected behavior in OnBase, such as data loss and poor performance. To allow users to return more than one result, set the primary of the External AutoFill Keyword Set to call an External Keyword Data Set containing the appropriate values. For more information on configuring External keyword Data Sets, see the System Administration help file or module reference guide.

      • The second parameter, context, contains three properties:

        KeysetID- Retrieves the AutoFill Keyword Set number.

        KeysetName- Retrieves the AutoFill Keyword Set name.

        UserName- Retrieves the user name of the current user.

      • The last parameter, results, retrieves the Secondary Keyword Values. It has the following methods:

        BeginRow( )- Begins a new row in the result set. The caller should call this once for every row that is returned to satisfy the AutoFill Keyword Set results.

        AddData(KeyTypeName, value)- Adds a column value into the result set. This should be called once for every column in the AutoFill Keyword Set including the primary column.

        EndRow( )- Ends a row in the result set. The caller should call this once for every row after all column values have been added to that row via AddData( ).

    Note:

    MsgBox( ) can only be used in the Configuration module to test the VB Script and should be taken out of the VB Script when performing an AutoFill in the Client. If left in the VB Script, the AutoFill Keyword Set will not function.

    Note:

    Ensure that your VB Script adheres to External AutoFill Keyword Set Consideration requirements. See VB Script Considerations for External AutoFill Keyword Sets for details.

  3. Make the script available for External AutoFill Keyword Sets by configuring the VB Script. Ensure that you select External AutoFill Keyword Sets in Visible Scope during VB Script configuration (see Visible Scope.)
  4. Select the VB Script to use with the External AutoFill Keyword Set. From the AutoFill Keyword Sets Configuration dialog box, select an AutoFill Keyword Set Name and click External.
    Note:

    If the External button is not enabled, click Settings to ensure that you have External AutoFill Keyword Set selected and that you click Save to exit Settings.

  5. After clicking External, the External AutoFill Keyword Set Configuration dialog box displays.
  6. Select VB Script. From the drop-down list, select the appropriate VB Script.
    Note:

    You must have configured the VB Script in order for it to display in the list.