About Tunnel Script Values

An input table or document library lookup configuration allows you to retrieve values from a Tunnel script. This gives you the most flexibility in determining which values to present, based on information that users have entered.

When called, a Tunnel script receives as parameters the name and values of all fields entered on the DivePort page (all portal variables). If the Tunnel script declares a PARM of type string named INPUT_FIELD_TO_VALIDATE, DivePort also passes the name of the field being validated via this PARM.

When using a Tunnel script in an in a list constraint, in a lookup, or in a whole-record custom validation script, in addition to passing the current record’s parameters, DivePort also passes the QuickView names and values to the tunnel.

NOTE: Tunnel parameters must be supplied by non-Model QuickViews, for example, External, List, Free-Entry.

This allows you to construct a more general-purpose script for handling multiple columns in a table. You can have logic that determines which field’s values are being requested, and then prepare the list of valid values to be presented, for example, in a pull-down list. This list preparation can use all the PARMs passed into the script, allowing you to apply whatever arbitrarily complex logic is needed to determine the list of things for the user to choose from.

Note that for in a list constraints where the list comes from a Tunnel script (view), the order the values are displayed in DivePort is the order as it appears in the view. In the Tunnel output object, you can set the properties of a dimension to use another column for sorting. In the script, use the sort attribute; in the GUI in Workbench, use the sort by dimension property to order the data returned by the Tunnel script.

TIP: Ensure that any table constraints that use Tunnel scripts are not parametrized on any column in that table. Otherwise, the script is run once for each row in the table, and this can cause a noticeable slowdown.

For more information about Integrator Tunnel scripts, see Workbench Help.