PDF version of this page

Area and Rule Properties

Areas properties and it's Fields and Rules are modified via Edit, Properties icon with a field or area selected ....

... or by selecting a field or rule      and the icon from the Document window ...




... or by pressing Mouse Right from the (data) screen ...

... which opens an options list.





Properties of selected field ... is greyed unless exactly one field is selected.

Top

Area Properties

Data extraction area



This is the Area properties window.


You can add a new field, edit or remove a field from this list.

  • Name (of the area) may be changed - except the master area.
  • Height is the number of lines included in this area.
  • Options apply to areas - except the master area.






This is the Options pull-down.






Ends record means this field finalizes a record. Use this for the last line of multi-area records (product description KICKPLATE in these examples):

  • No optional lines.
  • Two lines, ending with KICKPLATE
  • Four optional lines.
  • Six lines, ending with KICKPLATE

Field Merging Options



Repetitive concatenates adjacent lines in input into one field, and opens Field Merging with these choices for the inter-line spacing in the merged field:

Top

Field tab




The Field tab of the Area windows shows fields. Add, Edit or Remove buttons are available, Edit allows the selected field to be modified.


Field properties are entered or edited through this window:

Normalize is the RegEx used to reformat input data to the XML field. Pre-defined expressions are provided, and you can include your own. Data is normalized in the output XML file. The common normalizations are:

Remove leading zeroes - used for records mode raw data - removes leading spaces and zeroes - retains one zero if the field is all zero.
Remove superflous white space - used to remove leading, trailing and internal multiple spaces (leaving one space).
Trim numeric - used to trim spaces from numerics, including substitution of 0 (or 0.00) if the field is empty.
Trim - trims leading and trailing spaces from the data - use for text data to avoid doing this at form design time. This is required for fields used as substitutions.

More information on RegEx hints
More information on RegEx expressions for download

Note: FormTrap does NOT support RegEx under the Support and Upgrades contract, help with or generation of custom RegEx expression is chargeable. New expressions may be added from time to time by FormTrap to the download list on the website.

Parser Type defines data content and defaults to Text. Number, Currency, Percent and Date recognize data and require Pattern. Pattern defines what the data parser looks for.

Pattern: for Number may be chosen or a new pattern entered, numbers that are both positive or negative required BOTH entries, semi-colon separated (as shown). Embedded thousand separators must be shown if the number is presented this way.

Position for the sign must be correct.



The prior pattern used for this form is suggested as most files are consistent in their data representation.





For Date, select from the pull-down or enter your own pattern to define how the input date (or time) is formatted, these are to Microsoft standards.

Other characters (for example, slashes) are checked on input and output, so must be correct.



d one or two digit day
dd two digit day
M one or two digit month
MM two digit month
MMM Month three character literal in Locale notation, case does not matter - eg Jun
MMMM Full month literal in Locale notation, case does not matter - eg June
yy Two digit year
h one or two digit hour (1-2)
hh two digit hour (01-12)
H one or two digit hour (0-23)
HH two digit hour (00-23)
m one or two digit minute (0-59)
mm two digit minute (00-50)
s one or two digit second (0-59)
ss two digit second (11-59)
a am/pm, AM/PM, a.m./p.m., A.M./P.M.

This is a correct string to output a time, expressed as 12:31PM.

Top

Rules Tab

Rules window
Rules tab within Rules and other area properties provides Add, Edit, and Remove rules. Add and Edit open the Rule window.

Rule type: has several alternatives:

  • Exactly matches is the usual selection (there is an "Apply NOT to result of matching" selection later to give negative rules).
  • Related field opens a pull-down showing sorted field names, chose the one to test.
  • Match (evaluate) what shows the comparison value.
  • Ignore case ticked does a comparison ignoring capital letters, ie HELLO, Hello and hello all compare as equals.
  • Apply NOT to result of matching ticked is a "not equal" comparison.





Rule Type: Contains is similar to Exactly matches but does the comparison anywhere in the field.

Rule Type: Empty tests for the absence of data (line feeds, etc. are ignored).

Rule Type: RegEx Expression provides a Wizard to select or key in the RegEx expression.

Rule Type: Evaluates numeric expression to true or non zero allows entry of a muParser expression.



For RegEx Expression, press the Wizard button.


The Expression Pull Down shows existing rule expressions. Normally you will want to modify something like Contains either one of two to match what you require (this expression is common for different document names of the same format). The bottom of this screen shows actions where you would normally choose Add (copy) ... to modify and create a new expression.

Below shows the "Before and After" of generating a new RegEx expression from the list via Add (copy)... that identifies the different types of Invoice documents from their titles.



Top