Using Associated Files
  Step ONE
Reserved Names
 
Step 3 - Creating Associated File fields in FTDesign


To generate an Associated File, you must create Associated File field(s) on the form(s). Associated file fields are created in the same way as normal text fields but do not print on the final output from FormTrap. After the new fields have been added, the form must be built into an ASC file and reloaded into FTSpooler.

More information on Loading and Updating FormTrap Forms

Instructions below show three different ways in which to design the Associated File field for different end results. Examples include obtaining a delivery email address from the input data, using a substitution file to obtain field values and using multiple Associated File fields on the same form.

Example 1: Capturing the Email Address from Input Data

If a client's email address appears in the input data file, it is then possible to use this data to email the form to that email address. An Associated File field is created which includes email address from the data and masks it with the Associated File command. At run time an Associated File entry is created, which directs FTSpooler to email to that email address. Note that you need to split the file into individual documents first.

To Create an Associated File Field in FTDesign:

  • Choose Text from the Draw menu or click the Text button in the tool bar.
  • Click and drag diagonally to add the text frame.
  • Release the mouse and the Text dialog box will open.
  • On the Definition tab, type the associated file command and a sample email address in the Text box.

    ##A#EMAILTO#email@domain.com


  • Highlight the sample email address and click the Link Selection button.
  • The Link to Field dialog box will appear. On the field dropdown menu, select a field name or click the Browse button to create a new field. This link field should map the corresponding email address in the input data file.


  • Click OK.


 
Top  
Example 2: Using Substitution

Associated Files can be used in conjunction with substitution to provide versatile document management. Associated file substitution allows each client to have a unique configuration for delivery. Each client's delivery options are stored in a file on the FTSpooler server. At runtime FormTrap accesses this file and delivers the formatted document to each client using the appropriate delivery method.

A substitution file needs to be created for each client. This file contains the delivery options for a client in the Associated File command format. FormTrap will access this file at runtime with the file and the Associated File commands will be used to determine the delivery method for this particular client.

To create a substitution file::

  • Open Notepad. (You may use other text editor such as Word)
  • Type in the Associated File commands in the Notepad. In our example, the formatted statement will be emailed to support@formtrap.com or (second example) faxed to 61293105172.


  • Save the file into the Substitution Directory which is by default located in

    C:\Documents and Settings\USERPROFILE\Application Data\TCGIS\ FTDataRoot\ DATAFOLDER\FTDATA\FTSUBST\

    where DATAFOLDER refers to the name of the data folder.

    This text file name must uniquely relate to each client (e.g. include the customer number in the substitution file name). We would use TCG001 as the customer number in this example.

Variable substitution field is created in FTDesign which uses the customer number to access the corresponding substitution file. The Associated File commands in the substitution file notify FormTrap of each client's delivery requirements.

To create a variable substitution field:

  • Choose Text from the Draw menu or click the Text in tool bar.
  • Click and drag diagonally to add the text frame.
  • Release the mouse button and the Text dialog box will open.
  • On the Definition tab, type a sample customer number in the Text box.


  • Highlight the sample customer number and click Link Selection button.
  • The Link to field dialog box will pop up. On the field dropdown menu. Select the customer number field name or click the Browse button to create a new field.
  • Check the Substitute from file checkbox and specify the substitution file type in suffix box, which is .txt in our example. Use Prefix if the customer name is prefixed, for example "FAX" if the file name is FAXcccc.txt.

    Suffix, defining the file type, can be any file extension in FTDesign, commonly used examples are image file jpeg/gif or text/word file .doc/.txt


  • Click OK.


  
Top  
Example 3: Using Multiple Associated Fields

The Associated file may contain one or many fields, all of which can be post-processed accordingly. Furthermore, multiple values can be concatenated to provide more meaningful information. In the following example, Associated File entries for the email address, email subject and invoice number are created. The Associated File entry for the invoice number is created so it can then be referenced in the email subject line.

To add the email address Associated File field:

  • Choose Text from the Draw menu or click the Text in tool bar.
  • Click and drag diagonally to add the text frame.
  • Release the mouse button and the Text dialog box will open.
  • On the Definition tab, type the associated file command and a sample email address in the Text box.

    ##A#EMAILTO#email@domain.com#


  • Highlight the sample email address and click Link Selection button.
  • the Link to field dialog box will pop up. On the field dropdown menu. select a field name or click the Browse button to create a new field.


  • Click OK.

The invoice number Associated File Field is created:

  • Choose Text from the Draw menu or click the Text in tool bar.
  • Click and drag diagonally to add the text frame.
  • Release the mouse button and the Text dialog box will open.
  • On the Definition tab, type the associated file command and a sample invoice number in the Text box.

    ##A#INV#12345#


  • Highlight the sample invoice number and click Link Selection button.
  • the Link to field dialog box will pop up. On the field dropdown menu. select a field name or click the Browse button to create a new field.


  • Click OK.

The email subject line Associated File field is created. This Associated File field will also reference the invoice number Associated file field created previously. To reference the other field, the Associated File field name is enclose in a square brackets "[ ]", within the command line. For instance,

##A#SUBJ#Your Invoice No: [INV]#

To create the field:

  • Choose Text from the Draw menu or click the Text in tool bar.
  • Click and drag diagonally to add the text frame.
  • Release the mouse button and the Text dialog box will open.
  • On the Definition tab, type the Associated File command in the Text box, which in our example is ##A#SUBJ#Your Invoice No: [INV]#.


  • Click OK.
Top