Step 2 - Define appropriate identification and split rules in FTSplitDef
Configure FTSplitDef to identify the file and to split it into individual documents. Each individual document can be then delivered to an individual recipient.
This step is optional and is normally used when a multi-document file needs to be split to deliver to multiple individual recipients (e-mail, fax, etc).
Create a New Entry
A new entry is created for each different type of document that is recognized. The identification, unwanted page and split rules can then be configured.
More information on Creating Entries in FTSplitDef
- Select New from the Entry menu or click Add new entry button.
- In the Entry box, give a meaningful name to the entry, such as document type.
- Set the Maximum number of rows per page of the sample data.
- For Records Mode Files, maximum number of rows per page is always 1.
- Click OK.
The new entry will appear in the bottom left hand corner of the FTSplitDef screen.
Load Sample Data
Load a sample data file to use as a test case:
- Select Load print stream from the File menu.
- Select an appropriate test case file in the Open dialog box and click the Open button.
- The test case data file appears in the main window of the FTSplitDef screen.
Create an Identification Rule
The identification rule is mandatory and is used by FTSplitDef to determine the type of file being processed. Identification is checked ONCE ONLY, within the first three pages, and the ENTIRE FILE is considered to be that case. To repeat, you cannot use Identification Rule to divide a file into components, the entire file is identified once only.
- Select the Identification rule button
- Highlight the text that will be used to identify the document.
- The identification rule and text used to evaluate the rule, are shown in the rules window.
Create a Split Rule
Split rules are optional and are used to split a print run into individual documents. FTSplitDef begins writing data to file until the first split rule succeeds. The file is then closed and FTSplitDef begins writing a new file until the split rule again succeeds. It will do this until the entire file has been processed writing separate files.
- Select the Split rule button.
- Highlight the text that you want FTSplitDef to evaluate.
- The split rule, its location, evaluation and the text used to evaluate, are shown in the rules window.
- Two methods to detect the start of a document are commonly used:
- A change in the document number (as shown above), for which you must change the rule evaluation to “Split on Change” (preferred)
- Field is equal to Page: 1, for which you must “Split on Match and check the rule for “Equal to”.
- Note: Check that Pages 10,11 … and 100, 101 … do NOT overlap on Page 1, otherwise if they do overlap, test for Page: 1 with a blank following.
Create an Unwanted Page Rule
Unwanted page rules are optional and are used to identify unwanted pages such as line-up pages and control totals.
- Select the Unwanted page rule button.
- Highlight the text that you want FTSplitDef to evaluate.
- The unwanted page rule, its location and evaluation and the text used to evaluate, are shown in the rules window.
Configure the Rule Evaluation
After defining the identification of unwanted and split rules, you may need to configure the rule evaluation for each entry in the rule file.
- Select Evaluation Rules from the Rules menu.
- For each rule type, set whether all rules or at least one rule must be satisfied before the action occurs.
- On the Split tab, select the correct Split on option.
- Click OK.
Save the rule file
Save rule file and transfer it to the computer where FormTrap Server is installed (if Developer's Kit and FormTrap Server are installed on different computers). The location where the file should be copied can be found or modified in FormTrap Server Core components Setup.
More information on Rule Files Location in FormTrap Server
Configure Rule Evaluation
Double click on the rules to change the properties. Options for Comparison rules includes: Equal to, Not equal to, Greater than, Greater or equal to, Less than, Less or equal to, Empty, and Non empty.