The HotDocs Computation Archive
Get Extra Help

0095 - Amicus Attorney File Parties

Description:

How to import and use party information from an Amicus Attorney file.


• Code •

Place party names into Multiple Choice variables:

// First clear the variables
CLEAR Clients-mc
CLEAR Lawyers-mc
CLEAR Parties-mc
CLEAR Other-mc

// Populate the multiple choice variables
REPEAT Amicus Parties
   IF PeopleRole = "Client"
      ADD "«PeopleFirstName» «PeopleSurname»" TO Clients-mc
   ELSE IF PeopleRole = "Lawyer"
      ADD "«PeopleFirstName» «PeopleSurname»" TO Lawyers-mc
   ELSE IF PeopleRole = "Party"
      ADD "«PeopleFirstName» «PeopleSurname»" TO Parties-mc
   ELSE
      ADD "«PeopleFirstName» «PeopleSurname»" TO Other-mc
   END IF
END REPEAT
 
 
Create a list of Parties to the action:

""
REPEAT Amicus Parties
   IF PeopleRole = "Party"
      RESULT + "«PeopleFirstName» «PeopleSurname»\r"
   END IF
END REPEAT
 
 
Single-line address for the first contact (Client):

// Start with the whole address
"«People1FirstName» «People1Surname», «People1Address»"

// Turn the first line break into a comma
SET Temp-n TO POSITION( RESULT, "\r" )
IF Temp-n > 0
   FIRST( RESULT, Temp-n - 1 ) +
   ", " +
   LAST( RESULT, LENGTH( RESULT ) - Temp-n - 1 )
END IF

// Turn the second line break into a comma
SET Temp-n TO POSITION( RESULT, "\r" )
IF Temp-n > 0
   FIRST( RESULT, Temp-n - 1 ) +
   ", " +
   LAST( RESULT, LENGTH( RESULT ) - Temp-n - 1 )
END IF

// Turn the third line break (if any) into a comma
SET Temp-n TO POSITION( RESULT, "\r" )
IF Temp-n > 0
   FIRST( RESULT, Temp-n - 1 ) +
   ", " +
   LAST( RESULT, LENGTH( RESULT ) - Temp-n - 1 )
END IF

// Turn the fourth line break (if any) into a comma
SET Temp-n TO POSITION( RESULT, "\r" )
IF Temp-n > 0
   FIRST( RESULT, Temp-n - 1 ) +
   ", " +
   LAST( RESULT, LENGTH( RESULT ) - 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.

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 linked to an Amicus file are referred to here as "Parties." When you generate a document from an Amicus file, you have access to the contact information for each party linked to the file. (Note that you are limited to the information on the party's Primary contact card). This data is sent to HotDocs in two different variable mappings. Descriptions of the mappings follow. You may use either or both.

Mapping #1: Numbered Variables. Amicus places each piece of party contact information in its own variable. These variables are named PeopleX..., where X is an integer representing the party's place on the file's list of parties. For example, the name for the second party on the file can be accessed through these variables: Party2FirstName, Party2MiddleName, and Party2Surname. See "Variables for Document Assembly" in the appendix of your Amicus Attorney manual for more information.

Mapping #2: Repeated Variables. Amicus also places all of the party contact information into repeated variables. This way all or select parties can easily be used in lists or placed in multiple choice variables. The variables are simply named Party..., followed by a reference to the specific piece of information. For example, the names for all parties on the file can be accessed through these repeated variables: PartyFirstName, PartyMiddleName, and PartySurname. It is recommended that you create a repeated dialog, such as Amicus Parties, and place the repeated variables in that dialog. The examples above show how to make use of these repeated variables.

Address Issues: The one difficulty with using Amicus addresses from a File is that the entire address is mapped to a single multi-line field. If you want to use a single-line address, you must reformat the Amicus field as a single-line field. The last example above shows how to do this. The technique used in this example is described in more detail in Computation #0094 - Amicus Attorney Addresses. Alternatively, you could use the looping technique described in Computation #0015 - Loops via REPEAT.

 

• Contributors •

LegalCS