Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Step 1: Create RTF with Merge Fields

The first step for creating a Document Generator template through EasyDocs is to create a Rich Text Format file (RTF) using Microsoft Word or Corel WordPerfect that includes mail merge fields. The RTF file will become the template in TeamConnect.

Important: Make sure that you have the appropriate rights assigned to you, as listed in Required TeamConnect User Group Rights.

To create an RTF with merge fields

  1. Create a Word or WordPerfect document that you want to convert to a Document Generator template.
  2. Insert a separate field of the type "MergeField" for each spot in your document where you would like to retrieve data from TeamConnect.

    For example, if you want a contact name to appear in a letter, you must insert two merge fields, one for the first name and one for the last name, because this is how the name is stored in TeamConnect.
    Be sure to read the tips in step 3 to avoid errors in the fields that you insert.

    Note: Merge fields appear in your document as field names surrounded by angle brackets, such as <<assignee>>. However, you cannot simply type such names directly into your document. You must use the special menu commands and procedures in Word or WordPerfect to create merge fields.

    Here is an example of inserting a merge field in Microsoft Word 2002:
  3. While inserting merge fields, keep the following in mind:
    • Do not insert two merge fields immediately next to each other. You must type a space or other text between merge fields to avoid errors.
    • Merge field names can include these characters: "A-Z", "a-z", "0-9", "." and "_". Do not include spaces in merge field names.
    • Do not include other types of fields in the RTF file that are possible in Word or WordPerfect, such as the current date. TeamConnect only recognizes mail merge fields. To insert the current date, create a basic merge field, which you can later map to the current date.
    • If you use the same merge field name more than once in an RTF to identify the same piece of information, you only have to map it once in TeamConnect.
    • If you need to include multiple merge fields that identify similar data, make sure to give them distinctly different names, because later they will all be listed in a single drop-down list when you are mapping them.
  4. Save the RTF file.
  5. Upload the RTF file as described in Step 2: Upload RTF File to TeamConnect, after completing your merge fields. If you need to, you can make changes after uploading the file and mapping the merge fields that you created so far.
    image
    image
    image

Basic Merge Fields

The purpose of merge fields in a template is to identify specific elements of TeamConnect data that should be retrieved when a document is being generated.

Basic merge fields are merge fields that do not need to follow any specific naming convention. You can specify any name when you define them in the RTF. Each merge field can be mapped to a simple data element in TeamConnect, such as a number, date, text, or list field.

Basic merge fields can be used to identify each of the following types of information:

  • Data from system fields (for example, fields in the General block of the record).
    If you want to map system fields automatically, you should follow a naming convention instead. See Automatically Mapped System Fields.
  • Data from custom fields (fields that are specifically created for your TeamConnect implementation and belong to specific Categories).
    If you want to map custom fields automatically, you should follow a naming convention instead. See Automatically Mapped Custom Fields.
  • Text that the user needs to enter manually at the time of generating a document with this template.
  • The current date.
  • Text from another file.
  • Attributes of the current user who is generating the document (usually, the current user's first and last name)
    Also see Predefined Merge Field Codes for predefined mapping to the current user.

For example, if a document template is based on a matter, you may want to retrieve the matter name and matter number. To do this, you can create merge fields with names like MatterName and MatterNumber, and this will help you to recognize them when you are mapping them in TeamConnect.

The following table provides examples of basic merge fields for a document template that is based on a project (such as Matter). You would need to map each of these fields manually after uploading the RTF into TeamConnect.

Examples of Basic Merge Fields

Data to be retrieved

Example merge field name

Sample output

Project name (system field)

<<MatterName>>

Company X vs. Company Y

Project number (system field)

<<MatterNumber>>

MATT-1234

Involved party selected in a custom field of type Involved

<<OCAttorneyFirstName >>

<<OCAttorneyLastName> >

Kerry Goldman

Date from a custom field

<<LossDate>>

November 1, 2006

Dollar amount from a custom field of type Number

<<EstimatedExpenses>>

$4,000.00

Text that the user provides when generating the document

<<SecretaryInitials>>

jh

Current date

<<Today>>

November 21, 2006

Content from file (Such as LetterInfo.doc)

<<InfoFile>>

"This is a paragraph of information that is shared among several templates and is therefore managed as a separate file."

The current user's name

<<currentUserFirstName>>

<<currentUserLastName >>

Jane Smith

Automatically Mapped System Fields

Using predefined merge field codes to automatically map system fields can save time and reduce errors in the configuration of your document template. When you open the RTF in the Data Mapping tool, TeamConnect does a lot of the mapping for you. See Locating the Data Mapping Tool for more information.

There are two ways to automatically map system fields:

You can also use predefined merge field codes to automatically map custom fields. See Automatically Mapped Custom Fields.

Predefined Merge Field Codes

The following table provides a list of merge field codes that automatically map to certain values, mostly having to do with assignees. These predefined codes make it easy to quickly map merge fields to assignees' contact information. This technique can also be used for custom fields of type Involved, as described in Automatically Mapped Custom Fields.

Note: The technique behind the merge field codes for people is that the colon (:) is replacing the navigation.user.contact or .contact.

Predefined Merge Field Codes

Object record type

System field

Predefined merge field code

Any record type (matters, tasks, involved parties, and so on)

Current date

Note: The date will be formatted using the format specified in System Settings. If you want to use a different format, do not automap the date.

<<@date>>

First name and last name of current user from his/her contact record

<<@user:firstName>>

<<@user:name>>

Name of user who created the record

<<@createdBy:firstName>>

<<@createdBy:name>>

Task

Task assignee's first name and last name

Note: These merge fields can be used inside of filter@ or loop@ merge fields that identify task records

<<@currentAssignee:firstName>>

<<@currentAssignee:name>>

Any project (such as Matters)

Main assignee's name information from contact record

<<@mainAssignee:prefix>>

<<@mainAssignee:firstName>>

<<@mainAssignee:name>>

<<@mainAssignee:suffix>>

<<@mainAssignee:title>>

Main assignee's contact ID

<<@mainAssignee:numberString>>

Main assignee's default address from contact record

<<@mainAssignee:street>>

<<@mainAssignee:city>>

<<@mainAssignee:state>>

<<@mainAssignee:postalCode>>

Main assignee's default email address

<<@mainAssignee:email>>

Main assignee's default phone

<<@mainAssignee:phone>>

Main assignee's default fax

<<@mainAssignee:fax>>

Main assignee's default Internet address

<<@mainAssignee:inetAddress>>

Main assignee's default rate

<<@mainAssignee:defaultRateValue>>

Main assignee's Social Security number or Tax ID

<<@mainAssignee:ss>>

Naming Merge Fields for Auto-mapping System Fields

You can cause system fields to be mapped automatically by following a naming convention in your merge field names:

@attributepath

where attributepath is the object attribute path that points from the starting object to the system field.

Object attributes are listed in Object Model: Read This First. To identify a system field that is related to the main object, create a path of attribute names that leads to the needed system field, delimited by periods (.).

Keep the following points in mind:

  • If the system field is within the main object on which the template is based (such as the project number), then the path only contains one attribute with no periods.
  • The final attribute cannot end with an arrow (->) in the attribute name as shown in Object Model: Read This First (or in related reference tables it points to) or the Object Navigator. For example, to select a contact, you must continue the path from contact-> to identify the name or some other attribute of the contact.
  • You cannot create a path through an attribute that ends with List->, because these are related and sub-objects. For these, you must use loop@ or filter@ merge fields.
  • System field names (known as object attributes) are case sensitive. Make sure to match the exact name and capitalization of the field name.

The following are examples of merge fields in a document template that is based on a project (such as Matter) that would be mapped automatically.

Examples of System Field Automatic Mapping

System field

Required merge field name

Sample output

Project name

<<@name>>

Company X vs. Company Y

Project number

<<@numberString>>

MATT-1234

Parent project name

<<@parent.name>>

Sorrelson Dispute

Opened On date of project

<<@openedOn>>

November 21, 2006

Name of contact selected in contact-centric field of project

<<@contact.firstName>>

<<@contact.name>>

Joy Ferguson

Main assignee first name, last name

<<@mainAssignee.contact.firstN ame>>

<<@mainAssignee.contact.name>>

Michael Ferguson

Main assignee's default phone number

<<@mainAssignee.contact.defaul tPhone.phoneString>>

323-900-1700

Involved party's default role (when used inside of a filter@ merge field)

<<@defaultCategory.name>>

OC Attorney

Project's current phase

<<@currentPhaseType.name>>

Intake

Automatically Mapped Custom Fields

You can use predefined merge field codes to automatically map custom fields. This can save you time and reduce errors in the configuration of your document template. When you open the RTF in the Data Mapping tool, TeamConnect does a lot of the mapping for you. See Locating the Data Mapping Tool for more information.

Note that when a field is automatically mapped, the formatting is set to default options. For example, an automatically mapped date value will be formatted according to the default date format set in System Settings.

To automatically map a merge field to a custom field

  1. Create a merge field with the following merge field name:
    @Detail[categoryTreePosition]/customFieldName
    where categoryTreePosition is the tree position of the category to which the custom field belongs, and customFieldName is the name (not the label) of the custom field.

    Examples:
    @Detail[CLMS_DEPA]/LiJudgeSettlemtDate
    @Detail[PRTP_0013]/PartyDate1

     
  2. If the custom field is of type Involved, and you want to retrieve an attribute of the Involved's contact record, you can append a colon (:) and the name of the attribute, as described in the Predefined Merge Field Codes table.

    For example, if InvolvedOCAttorney is a custom field of type Involved where an involved OC attorney is identified:
    @Detail[MATT_LITI]/InvolvedOCAttorney:name
    @Detail[MATT_LITI]/InvolvedOCAttorney:firstName
    @Detail[MATT_LITI]/InvolvedOCAttorney:phone
    @Detail[MATT_LITI]/InvolvedOCAttorney:street
    @Detail[MATT_LITI]/InvolvedOCAttorney:city
    @Detail[MATT_LITI]/InvolvedOCAttorney:state
    @Detail[MATT_LITI]/InvolvedOCAttorney:postalCode

     
  3. If the custom field is of type Custom Object, and you want to retrieve an attribute of the Custom Object record such as the name or number, you can append a period (.) and the name of the attribute.

    For example, if Litigation is a custom field of type Custom Object where a Litigation is identified:
    @Detail[MATT_LITI]/Litigation.name
    @Detail[MATT_LITI]/Litigation.numberString

     
  4. If the custom field belongs to a related object of the main record for which the document template is created, nest the merge field within filter@ or loop@ merge fields. Otherwise, it does not need to be nested.

If you followed these steps correctly, the custom field is mapped automatically when you open the RTF in the Data Mapping tool in TeamConnect. See Locating the Data Mapping Tool for more information.

Tip: If you prefer not to map the custom field automatically, try mapping it manually in the Data Mapping tool, as described in Custom Field Mapping.

loop@ Merge Fields for Selecting Related or Sub-objects

If you need to include fields from sub-objects or related objects in the document template, and you do not want the user generating the document to select them from a list, then use loop@ in your merge field codes in the RTF file.

Note: For users of Document Generator, loop@ corresponds to the Document Generator tag tc:loop for sub-objects and tc:search for related objects.

The Data Mapping tool provides you with additional options for filtering the available sub-objects or related objects. For example, you may want to get the business address, not just any address listed for the contact. See Locating the Data Mapping Tool for more information.

In some cases, even with criteria that you specified, multiple sub-objects or related objects may be found. For example, a contact may have more than one business address. In this case, data from all of them will be listed in the generated document.

For details about how to perform mapping, see loop@ Merge Field Mapping.

Related and Sub-objects Available Through filter@ or loop@

Main object for which document template is defined

Related objects/Sub-objects

Object attribute in the Object Navigator

Any object (Contact, Matter, and so on)

History

historyList->

Project (such as Matters)

Assignees

assigneeList->

Project relations (where related project is on left side of relationship)

leftRelationList->

Project relations (where related project is on right side of relationship)

rightRelationList->

Involved

involvedList->

Child or embedded projects

childList->

Tasks

taskList->

Appointments

appointmentList->

Accounts (budgets)

accountList->

Expenses

expenseList->

Contact

Addresses

addressList->

Phone numbers

phoneList->

Email addresses

emailList->

Internet addresses

inetAddressList->

Fax numbers

faxList->

Territories

territoryList->

Rates

rateList->

Skills

skillList->

Contact relations (where related contact is on the left side of relationship)

leftRelationList->

Contact relations (where related contact is on the right side of relationship)

rightRelationList->

Invoice

Line items

lineItemList->

When NOT to Use loop@

Do not use loop@ under the following circumstances:

  • If you want the user to manually select which sub-object's or related object's information to include in the generated document, you should use filter@. For details, see filter@ Merge Fields for User-selected Related or Sub-objects.
    If you want the user to manually select a sub-object or related object only when more than one is found, you should also use filter@.
  • If you want to retrieve the address (or other sub-object) of the contact in a contact-centric project, you cannot use loop@. Instead, it is recommended to retrieve the default address of that contact, using a basic merge field that is mapped to an object field.
  • If you want to get a sub-object that is set as "default," such as the default category, default address, or default phone number, you can do this with a basic merge field or an auto-mapped merge field, instead of a loop@ merge field. For examples, see Automatically Mapped System Fields.
  • If you want to get the main assignee's name, you can do this with a basic merge field or with an automatically mapped field. See Automatically Mapped System Fields.

Inserting loop@ Merge Fields

To set up loop@ merge fields for sub-objects or related objects

  1. In the RTF, insert a merge field with a name that starts with loop@ followed by the text of your choice.
  2. Insert (or nest) basic merge fields for the data that you need to retrieve from the sub-object or related object, formatted the way you want them to appear in the generated document.
  3. Complete the loop with a merge field named simply loop@.

For example:

The local office is located at the following address:
<<loop@partyAddress>><<street>>
<<city>>, <<state>> <<zip>>
<<loop@>>

This would generate the following:

The local office is located at the following address:
124 North Woodranch Road
Glen Oaks, CA 94551

For details about how to map these merge fields to TeamConnect data, see loop@ Merge Field Mapping.

filter@ Merge Fields for User-selected Related or Sub-objects

Using filter@ merge fields causes the document generator to pause at runtime and prompt the user to make a selection before the generator continues.

If you want the user to select related objects or sub-object(s) from which data must be retrieved, use filter@ merge fields. The Related and Sub-objects Available Through @filter or @loop table provides a list of related objects and sub-objects that the user can select for including data in the generated document.

When you use filter@ to define merge fields, you specify which related object records or sub-objects the user can select while generating the document. Data is then pulled into the document from the user-selected related records or sub-objects.

You can also nest a filter within another filter. For example, if you need the user to select a child project, and then select an assignee, you would nest one set of filter@ merge fields within another.

Note: filter@ corresponds to the Document Generator tag tc:filter.

When NOT to Use filter@

You should not use filter@ in the following circumstances:

  • If you want to retrieve sub-object or related object data automatically, and you do not want the user to select which sub-object or related object to retrieve, use loop@. See loop@ Merge Fields for Automatically Selecting Related or Sub-objects.
  • If you want to get information from the parent record of a project, use an automatically mapped merge field. See Automatically Mapped System Fields.
  • If you want to get information from a record that is not related to the record for which a document is being generated, this is currently not possible with EasyDocs. Instead, you must create a Document Generator template manually using XML tags, as described in About Document Generator.

Inserting filter@ Merge Fields

To set up filter@ merge fields for related or sub-objects

  1. In the RTF, insert a merge field with a name that starts with filter@ followed by the text of your choice.
  2. Insert (or nest) basic merge fields for the data that you need to retrieve from the sub-object, formatted the way you want them to appear in the generated document.
  3. Complete the filter with a merge field named simply filter@.

For example:

The following parties are participants in this matter:
<<filter@Participants>><<@contact.firstName>> <<@contact.name>>,
<<@defaultCategory.name>> <<@Detail[PRTP]/AgencyNumber>>
<<filter@>>

This would generate the following, if several related objects are retrieved:

The following parties are participants in this matter:
Reingold & Silverman, Outside Counsel Firm A-3433
John Silverman, Outside Counsel Attorney A-3434
Susan Yessler, Judge/Arbiter A-3420

For details about how to map these merge fields to TeamConnect data, see filter@ Merge Field Mapping.

if@ Merge Fields for Conditional Text

If you need the document generator template to include certain content only under a certain condition, use if@ merge fields.

The conditional content can include document content, such as text, and any other types of merge fields (basic, automatically mapped, loop@, and filter@ merge fields).

An if@ merge field can do any of the following:

  • Check if a certain category has been added.
  • Check if a system field has a value or not.
  • Check if a custom field has a certain value.
  • Check if a sub-object of a certain type has been added.

You define what the condition is that you need to check when you map the merge field to TeamConnect data.

Note: if@ corresponds to the Document Generator tag tc:conditional.

To set up if@ merge fields to identify conditional content

  1. In the RTF, insert a merge field with a name that starts with if@ followed by the text of your choice.
  2. Insert (or nest) basic merge fields for the content that you need to be generated only when the condition is met, formatted the way you want it to appear in the generated document.
  3. Complete the filter with a merge field named simply if@.

For example:

<<if@LitigationCategoryAdded>> If the condition is true, you will see the content of a related file.
Content of another file:
<<ImportedFileContent>>
<<if@>>

If true (that is, if the Litigation category exists), then the output in the generated document would be as follows:

If the condition is true, you will see the content of a related file. Content of another file:
"This is a paragraph of information that is shared among several templates and is therefore managed as a separate file."

For details about how to map the if@ merge field to define the condition, see if@ Merge Field Mapping.

Opening the Document Templates Folder

To upload RTF files to TeamConnect, and then map RTF merge fields to TeamConnect data, you must first locate the Documents Template folder.

The Document Templates folder can contain the following, as shown in the Document Templates Folder Example image:

  • RTF files—The original files upon which the document templates are based.
  • DM files—Files containing mapping information for an RTF file.
    Caution: Do not modify or delete these files. They are automatically generated by the Data Mapping tool to store the mapping information, and should not be opened, modified,or touched.
  • XML files—Actual document templates used by the system when a user generates documents.
    Caution: Do not modify or delete these files, unless they are created manually without the use of EasyDocs and have no corresponding RTF and DM files.
  • Sub-folders—Folders within the Document Templates folder for the object definition which can contain additional templates or files referenced by templates.
    Caution: Once you choose a directory to hold your document template, do not rename, delete, or move that directory. Also, do not rename, delete, or move files within the directory. If you do, the associated documents no longer work correctly for end users at runtime.

Locating the Data Mapping Tool

The Document Templates folder also contains the icon that opens the Data Mapping Tool.

image

To open the Document Templates folder

  1. In TeamConnect, click the Setup link. The Designer opens.
  2. In the Go to drop-down list, select Object Definitions. The Object Definition list view opens.
  3. Click the Document object definition.
    The Document tab view opens to the General page.
    image
  4. Click the Go to Document folder link.
  5. The Document page opens and the Document Templates folder is listed.
    image
  6. To open the Document Templates folder, click the Document Templates link in the Name column.
    The Document Templates folder opens.
    image

Once you open the Document Templates folder, you can view the contents or select one of the following icons to perform a task.

  • Was this article helpful?