The HotDocs Computation Archive
Get Extra Help

0094 - Amicus Attorney Addresses

Description:

How to import and use addresses from Amicus Attorney.


• Code •

Name and Address - Multi-line:

"«ContactName»
«ContactAddress»"

or,

"«ContactName»\r«ContactAddress»"
 
 
Name and Address - Single Line:

// First separate ContactStreet into a single-line format
SET Temp-n TO POSITION( ContactStreet, "\r" )
IF Temp-n > 0
   FIRST( ContactStreet, Temp-n - 1 )
   RESULT + ", " + LAST( ContactStreet, LENGTH( ContactStreet ) - Temp-n - 1 )
END IF

// Add the other info
"«ContactName», " + RESULT
RESULT + "«ContactCity», «ContactState» «ContactZip»"
IF ANSWERED( ContactCountry )
   RESULT + ", «ContactCountry»"
END IF
 
 
Re-format the street address as Street1, Street2:

SET Temp-n TO POSITION( ContactStreet, "\r" )
IF Temp-n > 0
   FIRST( ContactStreet, Temp-n - 1 )
   RESULT + ", " + LAST( ContactStreet, LENGTH( ContactStreet ) - Temp-n - 1 )
END IF
 
 
Separate the street address into Street1 and Street2:

SET Temp-n TO POSITION( ContactStreet, "\r" )
IF Temp-n > 0
   SET ContactStreet1 TO FIRST( ContactStreet, Temp-n - 1 )
   SET ContactStreet2 TO LAST( ContactStreet, LENGTH( ContactStreet ) - Temp-n - 1 )
END IF

• Explanation •

Amicus Fields:

This explanation assumes that you have successfully set up a HotDocs template in Amicus Attorney. If you do not know how to do this, see "Working with Documents" your Amicus manual.

The examples above demonstrate the main ways to use Amicus Attorney addresses in a HotDocs template. These examples use the default Amicus Attorney field names. If you have mapped your Amicus fields to HotDocs fields, you will need to change the field names accordingly.

Contacts v. File Parties: The examples above all use data derived from the Contact List. In other words, the examples assume that the document was generated from a contact card. Documents generated from a File access the same contact data, but use different field names. For more information on accessing contact information through a File, see Computation #0095 - Amicus Attorney File Parties.

Street Address Issues: The only difficulty with using Amicus addresses is that the Amicus street address is a multi-line field. If we want to use a single-line address, we must either reformat the Amicus field as a single-line field or separate it into ContactStreet1 and ContactStreet2 fields. Two examples above demonstrate this. Both use the same logic: First look for the line break ("\r"), place its character position in the temporary number variable Temp-n, then separate the field at this break using the FIRST, LAST, and LENGTH models. Everything from the FIRST of the string up to the break (Temp-n - 1) is Street1, and everything from the break to the LAST (LENGTH( ContactStreet ) - Temp-n - 1) belongs in Street2. We can then either place these values in our own ContactStreet1 and ContactStreet2 variables, or we can simply return the values formatted as Street1, Street2.

NOTE: In determining where the break occurs, it is important to remember that a line break is actually two characters long (line feed character + carriage return character).

 

• Contributors •

LegalCS