PDF version of this page

Maintenance

Lookup Table Maintenance is a separate function of FormTrap Server Version 8, with the Lookup Table used by both FTForm Plus and by the production system. Lookup Table Maintenance should be a to a file accessible to FTForm Plus, in the same way as substitution files. Transfer of the file to Production is done the same way as Substitutions, in FTClient, Data Folders.

Lookup tables are an option when defining Delivery Tags and Form Fields. A lookup table element contains two fields; Name and Value. Name is the "lookup", normally type-of-lookup suffixed with a field from the FormTrap XML definition, which substitutes the Value portion of the table entry into the Delivery Tag or Form Field. Example: "staff email wpg" returns "Paul.Green@FormTrap.com". Any number of different lookup tables may be defined, all are stored in the one XML file.

Note: From Version 8.7, Lookup search Name is set to lower case with the search comparison no case.

Lookup Table in Detail

The Lookup table holds Name which is used to look up Value. This is a section of a lookup table:

Lookup name is sorted when loaded. Multiple entry types may be included in the one table - in this one we have a range of china uom-x names used to lookup Chinese UoM equivalent values for the form. We also have expansion of clause text numbers (clause text-xxx) to clause text.

While after-inclusion maintenance is unlikely, some values (for example, staff printer-iii) must change as a staff member relocates to allow FormTrap Server to re-direct their output to their new location.

Name is a description(clause text-), followed by a code (c047) where multiple lookups for code values exist. Code MUST be defined as "Trim" to remove spaces. The looked-up Value is what gets returned from lookup table substitution, unless there is no matching Name, in which case the supplied Name is returned (ie looking up staff-email-wgp where this name does not exist returns exactly staff-email-wgp).  You can test the constant part of returned value to find out if the lookup exists.

Lookup tables are held as a single XML file called lookup.xml. Lookup table may be common to all Data Folders for your FormTrap system or private to a single Data Folder.

Top

Update the Correct Substitutions Folder to the FormTrap Server

To make the amended Lookup Table available to FormTrap Server, go to Data folders, locate the data folder where you want to apply the lookup table and press Folder properties....


Look at window and see if the folder has Use private substitution folders for this data folder ticked, then Cancel.


If ticked, select the Substitutions folder within the Data Folder...

... otherwise select the common substitutions folder as shown ...

Press Add substitution files ... and select lookup.xml for transfer into the FormTrap Server.

Top

Define Formula in (data)

Define a Formula for substitution. Select type as Concatenated/substituted field (text).

Define the formula as shown:

Name is the name of this formula, you will use this as the link in the text field on the form.

The concatenated field is a constant (PayFrequency-) with the Insert... of the Payment Frequency code afterwards.

Substitution select Substitute from lookup table from the pull-down.

Test bench allows you to see what the resulting lookup name will be.

Note that you can use more than one code in a lookup table name, this as an example allows customer code and department to supply email address:

Top

Define data source in (form)

Define a text field to print the substitution. Select Link as the formula field.

Top

Missing Lookups

Where missing lookups are not allowed (for example, contract clauses for insurance contracts), the -xstrict option in FormTrap Server Queues, Processing tab, Options reports missing lookups as errors (see here).


Where missing lookups are allowed (say, looking up a product description) then normally both the data field(s) and lookup are defined, with rules.  This is a Product Description field with it's rules for both present and absent lookups.

This shows the object where BOTH fields are defined:


Rule on the data portion where there is no lookup (same rule for Prod Descr1, Space and Prod Descr2).  Return of the lookup name signifies the lookup entry did not exist.


This is the rule on the lookup portion (reverse of the above rule).


Top