PDF version of this page

Step 1 - Create Associated File fields in FTDesign

Text objects of the form ##A#name#data# generate one line in the output Associated File (suffix .af, txt format in UTF-8,) and do not print. name may be a reserved word used for delivery or may be your own name for your own purposes, data may be constant or taken from input data. We recommend placing Associated File fields in an "impossible" area such as in the detail area and in color and all together.

The examples below assume operation on a single document file produced via the Splitter.

More information on Associated File Reserved Names

Example 1: Emailing the Document using Email Address from Input Data

A client email address within the input data can be used to email a form. At run time, an Associated File entry is created that directs the Server to email. The reserved name SMTPTo (there is a MAPI equivalent) directs the spooler to email via SMTP.

To Create an Associated File Field in FTDesign:

  • Choose Text from the Draw menu or click the Text button in the toolbar.
  • 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#SMTPTo#email@domain.com#
  • Mark variable
  • Highlight the sample email address and click the Link Selection button as shown above.
  • The Link to field dialog box appears. On the field dropdown menu, select a field name or click the Browse button to create a new field. The link field must map the email address in the input data file.
  • Link to field
  • Click OK.
  • Click Ok, linked field is underlined

Top

Example 2: Using Substitution

This builds on the previous example, except in this case the client’s fax number is not in the input data file. The client's fax number is saved (once only) in a text file where the client number replaces “xxxxx” as part of the file name – for example Fax-xxxxx.txt becomes Fax-TCG01.txt . The content of the file “substitutes” into the Associated File field at run time.

One substitution file (.txt format, stored as UTF-8) containing their fax number should exist for each client requiring fax delivery where the file name includes their client number (TCG01 in the examples).

To create a substitution file:

  • Open Notepad (or other text editors such as Word or PSPad).
  • 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.
  • Where substitution files contain characters above hex 127 (examples: currencies ¢ £ € ¥, symbols © ™ ®, foreign letters é Ö ß etc. or smiley faces) substitution files MUST be saved in UTF-8 format (Notepad > File > Save as window, Encoding prompt, UTF-8 from the drop down list).
  • Notepad substitution .txt files
  • Save the file(s) into the Substitution Folder (Data folders, Add substitutions files … from the menu bar).
  • The text file name must include client identifier (e.g. include customer number in the substitution file name). TCG01 in this example.

This is the Associated File text object to notify FormTrap Server to deliver a fax to the client.

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.
  • select text to link to field
  • 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, Prefix is Fax- and Suffix is .txt in our example. The full file name is then Fax-CCCNN.txt.
  • Note: Suffix, defining the file type, can be any file extension and is normally .txt. Neither prefix nor suffix is mandatory.
  • Link to field
  • Click OK.
  • Linked text is underlined

Top

Example 3: Using Multiple Associated Fields

The Associated file may contain many fields. Furthermore, multiple identical reserved names will either concatenate (for recipients) or subsequent same-named entries are ignored (non-recipients). In the following example, two Associated File entries are created.

To add both the Associated File fields:

  • 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 commands for email address and subject line, with provision to link to data.
  • ##A#SMTPTo#email@domain.com#
    ##A#Subj#Our invoice: inv-no against your PO: po-num is attached.#
  • Text object
  • Email address is included as shown in Example 1 or 2.
  • email address is included as shown in above examples

Top

Example 3: Using Multiple Associated Fields

This generates three sample entries, one each for Invoice, PO Number and Date. Refer to Step 3 for usage.

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 commands for Invoice and PO Number in the Text box.
  • ##A#Invoice#invoice#
    ##A#PO Num#po-num#
    ##A#Date#doc-date#
  • Link to several different variables
  • Link the fields to data as shown. doc-date shows custom masking to produce 2010-05-14 as output.
  • custom date format

Top