Capturing addresses

By using a certain format, the Invoice modules can capture and interpret addresses printed on invoices. The procedure is described below.

Tip: A simpler thing that could be tried first is the Paragraph setting. That setting is available in the Placement settings of the Field profile dialog and in the Advanced dialog (field learning).

  1. First there must be a line that always contains specific words that can be specified as titles.

    In our instructions below, this is defined as the headerline field profile.

  2. Then there must be some rows containing the address.

    Below, these are line1, line2, and cityline.

  3. A last line must always mark the end of the address, and you must be able to find this last line using a DCL expression (which you must supply yourself).

    Below, the DCL expression is in a file named postaladdress.dcl.

 

Example

Your company has offices in different locations but centralized invoice processing. You want to capture the address that the invoice was sent to in order to see which office received it. All addresses begin with the company’s name. Compare the example with the description above and the instructions further below.

ExampleCompany Inc. – define as headerline and connect to AddressHeader, for example.

Any Dept. – define as line1 and connect to AddressLine1, for example.

Any Street 123 – define as line2 and connect to AddressLine2, for example.

AnyCity, XX 12345 – define as cityline and connect to AddressFooter, for example.
 

ExampleCompany Inc.
Any Dept.
Other Street 234
Other City, XX 23456

To capture an address

  1. Create a field profile for each line in the address. The title of the first field profile (for the top line) will be used to find the address position. There is no limit to the number of lines you can use.

  2. Open the Eiglobalextra.ini file that is used for the invoice profile.

  3. Anywhere in that file, create a section called [Address1].

  4. In that [Address1] section, connect your address field profiles to the logical division of the address, like this:

    [Address1]
    AddressHeader=headerline
    AddressLine1=line1
    AddressLine2=line2
    AddressFooter=cityline
    AddressFooterdcl=postaladdress.dcl

    Important

  5. Add an AddressFooterdcl setting, specifying the name of your DCL file, like this:

    AddressFooterdcl=postaladdress.dcl

  6. Add appropriate SearchRect settings (as described here), like this:

    SearchRectTop=0
    SearchRectBottom=30
    SearchRectLeft=0
    SearchRectRight=30

Warning

Do not specify Address1 in the [FieldTypeNames] section. You can still use [Address1] in any number of invoice profiles—always using the same field profile names, of course.

Do not connect your address fields (headerline, line1, etc. in the example above) to any field type. Instead, connect them to AddressHeader, AddressLine1, etc. in the Eiglobalextra.ini file, as described above.